Advertisement Jump to content


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


windowed mode

This topic is 6124 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

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 );

hr = D3DXLoadSurfaceFromFile( g_pBackground,
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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!