Jump to content
  • Advertisement

Archived

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

pickups

Reading the front buffer

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

hello. i want to read the front buffer, after i render to it. should i use GetFrontBufferData()? if so, how sould i initialize the surface object i pass to it? [edited by - pickups on June 17, 2003 12:25:37 PM]

Share this post


Link to post
Share on other sites
Advertisement
I think GetFrontBuffer isn''t working correctly in windowed mode. What I do, is create a Surface, and use the function you mentioned to get a valid surface from it. I dont have much time to explain now, maybe later. Someone else maybe?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
As the help says...

Must be systemmem.

For windowed mode, the size of the destination surface should be the size of the desktop.

For full-screen mode, the size of the destination surface should be the screen size.

Must be D3DFMT_A8R8G8B8

This function is very slow, by design, and should not be used in any performance-critical path

Share this post


Link to post
Share on other sites
thnx.
so what other methods do i have to copy the front buffer data to a slice of a 3d texture?
can i render to the slice directly, or maybe should i render to texture, and than lock it and copy its contents to the slice?
if so, how can i restore the render target to be the front buffer?

Share this post


Link to post
Share on other sites
Getting the backbuffer / frontbuffer is almost always slow as hell. I believe the catalyst 3.4, or whichever the latest ones are, have made this faster.

Share this post


Link to post
Share on other sites
i cant figure out the way to do it. if i render to a texture, the texture cannot be locked, becuase i cannot specify the D3DUSAGE_DYNMAIC flag to it. and i looked at other functions, but even with D3DXLoadSurfaceFromSurface i cant make it, becuase i cant get a surface for a specific silce of the volume texture. i can lock the volume texture, however.
the only way i can think about is to create another 2d texture like the render target but dynmic, render to the texture, copy it to the dynamic texture, and than lock. but this sound inefficient. any ideas?

Share this post


Link to post
Share on other sites
ok, so if you dont know, than maybe you can tell me how you initialize the surface to be sent to GetFrontBufferData?
using direct draw interfaces?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You should never need to access the front buffer. D3D8/9 supports a lockable back buffer (if the driver supports it) which you can use to get the image. Not all devices allow this. You should get full AA on the back buffer and everything.

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.

GameDev.net 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!