Skip to main content
gamedev.net
🔒 Locked

setting Z buffer

Started by Pseudo 0 replies 350+ views
Original Post
Pseudo
Pseudo
I''m trying to render to an offscreen surface using managed directx but I''m missing something. (too bad the docs are no help) I''ve created a rendertarget, and I can set it with device.SetRenderTarget(...) but I dont see how to create and set another zbuffer. There is no SetZBuffer device function, however there is a GetDepthStencil function, so how would I Set it? My offscreen surface is only 512x512 so I would assume that I need to make a 512x512 depth buffer too...and set it somehow.
Pseudo
Pseudo
Never mind, I figured it out. I just decided to use the RenderToSurface class with a texture made with the RenderTarget flag. It works well. Check out my cool feedback effect (with source): www.msu.edu/~furtwan1

Topic Locked

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

Sign in to reply to this topic.