Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

GL_INVALID_OPERATION errors from ofxUI #221

Open
moonryul opened this issue Aug 11, 2014 · 0 comments
Open

GL_INVALID_OPERATION errors from ofxUI #221

moonryul opened this issue Aug 11, 2014 · 0 comments

Comments

@moonryul
Copy link

Hi, I have been testing an application which uses ofxUICanvas class several days. I have been tracking GL_INVALID_OPERATION errors in my application code. Finally I found out that these errors come from ofxUICanvas::draw() method. I am using the core profile of opengl by using the following main:

int main() {
ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);

ofSetLogLevel(OF_LOG_VERBOSE);
ofSetupOpenGL(1024,768, OF_WINDOW);     
ofRunApp( new ofApp());

}

ofxUICanvas::draw() calls glDisable(GL_LIGHTING) which is deprecated in the core profile.
This error seems to occur because I use the core profile, whereas the draw() method uses
deprecated commands.

This error also occurs in the following part of the draw() method:

vector<ofxUIWidget *>::reverse_iterator it = widgets.rbegin();
vector<ofxUIWidget *>::reverse_iterator eit = widgets.rend();
for(; it != eit; ++it) {
if((_it)->isVisible() && ((_it)->getRect()->rInside(_rect) || (_it)->isModal())) {
(*it)->draw();
checkGlErrors();

    }
}

Question 1: My guess that these GL_INVALID_OPERATON errors are caused by using the core profile is correct?

Question 2: Can I ignore these errors, because GL_INVALID_OPERATION errors simply ignore the
offending commands, so that the result is the same as when I do not use these commands?

Question 3: Is there a version of ofxUI which nicely incorporates the core profile?

SIncerely yours
Moon Jung

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant