Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

DDraw clipper problems.

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 voodoo   Members   

122
Like
Likes
Like

Posted 19 January 2000 - 07:56 PM

When I create a clipper and attach it to my back surface, using the folowing methods. void DDCreateClipper(LPDIRECTDRAWCLIPPER &pClipper) { if(DDraw4->CreateClipper(0,&pClipper,NULL)!=DD_OK) Message("Failed to create clipper."); } void DDAttachClipper(LPDIRECTDRAWCLIPPER pClipper, G16SURFACEPTR pSurf) { if(pSurf->Surface->SetClipper(pClipper) != DD_OK) Message("Failed to attach clipper to surface."); } Somehow, my FIllSurface function does not work. I use FillSurface to clear up any surface to any color I want. This is my FillSurface function: void FC FillSurface(G16SURFACEPTR pSurf, USHORT pColor) { DDBLTFX BLTFX; ZeroMemory(&BLTFX, sizeof(DDBLTFX)); BLTFX.dwSize = sizeof(BLTFX); BLTFX.dwFillColor = pColor; pSurf->Surface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL / DDBLT_WAIT, &BLTFX); } Now, if I dont create the clipper the fillSurafce works fine and clears the screen. I have also noticed that if I create the clipper using the region data method by definning my own clip rectamgles and set it to the screen res FillSUrface works fine! Any ideas?

#2 voodoo   Members   

122
Like
Likes
Like

Posted 19 January 2000 - 08:24 PM

Hehe I solved my own problem.

For the clipper to work properly you must specify for it the size of the clipping region, there''s 2 ways either by getting the Window Handle or by manualy creating your own region data.

So I guess if the clipper does not have a size set any blt calls you make will be completley invisible!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.