Depth buffer availability

BlitzMax Forums/OpenGL Module/Depth buffer availability

ImaginaryHuman(Posted 2006) [#1]
When i open various graphics displays in OpenGL it seems that there is always a depth buffer even if I don't ask for one, and yet I have to deliberately specify other buffers such as alpha or stencil to get them.

Can I assume that every OpenGL implementation will definitely give you some kind of a depth buffer across the board?

[Edit] Well. on my other platform it opened a 16-bit screen with no depth buffer, so I guess that answers that.

I notice you can ask for a buffer and if it is supported the display will open and if it is not supported it will bomb it. It would be SO much better, BRL, if you could just ask for what buffers you want and if they aren't available in the given mode, you systematically remove the buffers until the mode works?

I guess you can't assume anything.


tonyg(Posted 2006) [#2]
Isn't it because of this...
Function GLGraphics:TGraphics( width,height,depth=0,hertz=60,flags=GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER )
in glgraphics.mod?


ImaginaryHuman(Posted 2006) [#3]
Yah, that'll be why, you'd think, but sometimes there isn't a depth buffer.