Problems with windowed mode

Started by
23 comments, last by ELFanatic 16 years, 10 months ago
I have one monitor. Cool. Thanks for writing the code. I'll look through it tonight and see where I screwed up.
Advertisement
You're welcome.
Quote:Original post by streamer
Here is one program I wrote that do same thing you need. It works perfectly.
Anyway, maybe it is not so important, but you have one or two monitors?


it does indeed clip correctly. some reason though, when I move it off screen and then drag it back, the clipped portion is black until I release the mouse button. Still, thank you greatly. This will hopefully help me figure out what I'm doing wrong. Thank you again.
That is because of window messages. When you click and drag on non-client area program doesn't have time to render. That is why is there "black screen". It is not rendered. But as soon as you release the mouse button render starts again.
I figured out the problem. For the presentation parameters I put

D3Dpp.BackBufferWidth = WINDOW_WIDTH;
D3Dpp.BackBufferHeight = WINDOW_HEIGHT;

Rather than assigning them to 0. Took me a little while to figure it out. Does anyone know why this makes such a difference?

This topic is closed to new replies.

Advertisement