I'm investigating making some simple widgets using bgl and finding it difficult to use the depth buffer without making a mess of the area I'm drawing in.
Enable depth testing:
glEnable(GL_DEPTH_TEST)
glDepthMask(GL_TRUE)
From here I've tried calls to glDepthRange(...)
, glDepthFunc(...)
, with varying degrees of success, but without a handle on writing above the view, ie when I do get an element to draw behind it ends up behind everything and can't be seen. (well at least I'm assuming that's the case)
Will keep editing the question as I get more o fay with bgl / opengl.