Advertisement

Stupid clipper question

Started by November 15, 1999 05:19 PM
0 comments, last by Matt 25 years, 2 months ago
Ok, I'm assuming this is related to my clipper, since it's the one part that has never worked correctly.

The problem is that if my windowed applications get put into the background, they fail to comprehend this and continue to draw in front of any window that they are behind.

My reason for suspecting my clipper is the sheer fact that it has never worked. I cannot set the clipper on the front buffer, or else I will get no output at all. I've tried adjusting my output to see if it's being clipped, but everything I've tried has come up with the same result, a blank white window.

Looking at the examples, I see nothing special that let's them do this, and their "SetClipper" calls work as expected. For example, the stretch example can be overlapped, or partially overlapped and display properly.

Anything I'm missing here?

Are you remembering to set the window handle for the clipper? You should be doing something like this:

hr = lpDD2->CreateClipper(0, &lpDDClipper, NULL);
// Check for errors here...
hr = lpDDClipper->SetHWnd(0, m_hWnd);
// Check for more errors...
hr = lpDDSPrimary->SetClipper(lpDDClipper);
// Even more error checking...

That's all you need for the front surface of a windowed app. Back surfaces and fullscreen primaries have the added pain of needing region data and clip lists to be set.

Please post the code where you set up your clipper and I'll try to help more.

-Evil

------------------------
E.N.D. - http://listen.to/evil

This topic is closed to new replies.

Advertisement