
Al
typedef struct gob{ int width; int height; LPDIRECTDRAWSURFACE7 surface;} GOB;
void glBlitGOB( GOB* g, int x, int y ){ RECT src; // First I eliminate GOBs that are totally outside // the clipping region. if( x > ClipX2 ) return; if( y > ClipY2 ) return; if( x + g->width < ClipX ) return; if( y + g->height < ClipY ) return; // By default I want to blit the entire GOB src.left = 0; src.top = 0; src.right = g->width; src.bottom = g->height; // But then I adjust the area to be blitted based on // whether or not parts fall outside the clipping // region. if( x + src.right > ClipX2 ) src.right -= x + src.right - ClipX2 - 1; if( y + src.bottom > ClipY2 ) src.bottom -= y + src.bottom - ClipY2 - 1; if( x < ClipX ) { src.left += ClipX - x; x = ClipX; } if( y < ClipY ) { src.top += ClipY - y; y = ClipY; } // Then I blit it. BackBuffer->BltFast( x, y, g->surface, &src, DDBLTFAST_SRCCOLORKEY / DDBLTFAST_WAIT );}
quote:
Original post by voodoo
I guess you can write your own clipper code. But what I have read or seen and been told blt fast is only faster in software, not hardware in hardware it''s as fast!