Hi,
I'm trying to do some sanity testing while writing shaders. It would be great if I could specify the clear value of the depth buffer so I can check it in my shader. In OpenGL, this is done with 'glClearDepth' as far as I can tell, not sure about D3D. It seems like the right place would be in the Viewport class. Maybe the interface would look like this?
If you don't mind clearing manually rather than using the auto clear, you can call Viewport::clear which takes a colour, depth and stencil value to clear the buffer with.
I see, Viewport::clear is new in SVN trunk. I added it to the changelog in the CthugaNotes in the wiki.
Anyway, having a getter/setter for a depth value is still nice and not hard to do and doesn't need any adjustments design wise.
Cryfer, if you still need it, best implement it yourself and submit a patch.
haffax wrote:Anyway, having a getter/setter for a depth value is still nice and not hard to do and doesn't need any adjustments design wise.
Cryfer, if you still need it, best implement it yourself and submit a patch.