Sign in to follow this  

d3d surfaces...

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

Hi, I noticed there are some methods in IDirect3DDevice9 that allow the creation and retrieve of surfaces (like depthstencil, etc...). I wonder: why would one want to use these methods if these surfaces are automatically managed by d3d? Aren't they? Thanks

Share this post


Link to post
Share on other sites
For things like depth/stencil: I've seen times where people have wanted to load a premade depth buffer at the beginning of each frame. That required locking and writing to it. Also, someone might want to get at the buffer in order to debug, by either converting it to a color format that can be displayed, or by writing it out to a file to read later, or by simply wanting to step through the memory with the debugger.

For surfaces attached to a standard texture (mipmap surfaces), a person might desire to create their own mipmap levels, if they don't like the standard filtering, or have some special need regarding mipmaps.

Also, when you start playing around with changing your render target, and using render target textures, you'll want to be manipulating the render target surface.

There're probably other times that you'll want to access other surfaces that are typically managed by DirectX, but these were the first few that I thought of.

Share this post


Link to post
Share on other sites

This topic is 4857 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this