Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

russian-bear

windowed mode

This topic is 5938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
It is possible but if i remember correctly you get the back buffer differently in windowed mode. I think in fullscreen you call GetAttachedSurface() right? but in windowed you have to create the back buffer yourself. Possibly as a regular offscreen surface but with dimensions the same as the window.

Hope this helps

Share this post


Link to post
Share on other sites
Hmm no..that is not entirely correct...
I use these calls:
g_pD3DDevice->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &g_pD3DBackSurf );

// Create the background image surface
g_pD3DDevice->CreateImageSurface( 800, 600, D3DFMT_A8R8G8B8 , &g_pBackground );

and
hr = D3DXLoadSurfaceFromFile( g_pBackground,
NULL,
NULL,
"back.bmp",
NULL,
D3DX_DEFAULT,
0,
NULL );
then i render like this:
g_pD3DDevice->CopyRects( g_pBackground, NULL, 0, g_pD3DBackSurf, NULL );

Share this post


Link to post
Share on other sites
Have you checked the return values of those functions? Do they return a success or failure?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!