Jump to content
  • Advertisement
Sign in to follow this  
MrDoomMaster

IDirect3DDevice9::GetFrontBufferData()

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

Please confirm if I am correct or incorrect, and also provide any comments on things I am missing... In order to obtain the front buffer data, I have to do the following: 1) Create a IDirect3DSurface9 object via a call to IDirect3DDevice9::CreateOffscreenPlaneSurface() 2) The size of the Offscreen Surface created in step #1 should be the size of the desktop if in windowed mode, or the size of the display resolution in fullscreen mode 3) Submit the created offscreen surface pointer to IDirect3DDevice9::GetFrontBufferData() and it will be filled with information on the front buffer This is correct, right? I hope so. I'm going to try it. In the meantime, what is a recommended method of getting the pixel size of the desktop? Also, how many bits do I set my offscreen surface to be, depending on windowed or fullscreen mode? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MrDoomMaster
1) Create a IDirect3DSurface9 object via a call to IDirect3DDevice9::CreateOffscreenPlaneSurface()

The format has to be D3DFMT_A8R8G8B8 for that function call to succeed.

Quote:
Original post by MrDoomMaster
2) The size of the Offscreen Surface created in step #1 should be the size of the desktop if in windowed mode, or the size of the display resolution in fullscreen mode

Correct.

Quote:
Original post by MrDoomMaster
3) Submit the created offscreen surface pointer to IDirect3DDevice9::GetFrontBufferData() and it will be filled with information on the front buffer

Correct. Remember to SAFE_RELEASE() it when you're finished though [wink]

Quote:
Original post by MrDoomMaster
In the meantime, what is a recommended method of getting the pixel size of the desktop?

IDirect3D9::GetAdapterDisplayMode() should return the current information on the desktop resolution..

Quote:
Original post by MrDoomMaster
Also, how many bits do I set my offscreen surface to be, depending on windowed or fullscreen mode?

See my comment above - it's one format, and always one format (from my experience, and also what the SDK docs say) [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!