ofxControlPanel
ofxControlPanel copied to clipboard
glDisable(GL_DEPTH_TEST);
if depth testing is enabled, nothing draws correctly. ofxControlPanel should detect the state, disable, and restore when done drawing.
or you should disable depth testing before drawing the control panel ;-)
but if its an easy fix - I think it shouldn't be a problem :) do you have a code snippet ?
yeah, i'm currently disabling depth testing before drawing. but it wasn't really obvious to me what the bug is and took a minute to track down... so it would be great if it was checked for my default!
i just wrote a little snippet for you.
void ofxControlPanel::draw(){
if( hidden ) return;
GLboolean isDepthTesting;
glGetBooleanv(GL_DEPTH_TEST, &isDepthTesting);
if(isDepthTesting == GL_TRUE)
glDisable(GL_DEPTH_TEST);
...
if(isDepthTesting == GL_TRUE)
glEnable(GL_DEPTH_TEST);
}
ooops! same error here.. glad i've found these comments! @Theo a quick fixie would be great!
- ) .r