• Advertisement

Archived

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

windowed mode

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

  • Advertisement