Skip to main content
gamedev.net
🔒 Locked

windowed mode

Started by russian-bear 2 replies 200+ views
Original Post
russian-bear
russian-bear
I cant copy surfaces to backsurface in windowed mode, is it not posible? In fullscreen mode its no problem..
< There are no stupid questions, only stupid answers! >
Zeke
Zeke
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
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
russian-bear
russian-bear
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 );

< There are no stupid questions, only stupid answers! >
Zeke
Zeke
Have you checked the return values of those functions? Do they return a success or failure?
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.