in Education by
I'm working on some graphical application and i got an GL_INVALID_OPERATION after glPopAttrib(). Predicting the answer "It seems you call glPopAttrib() within glBegin/glEnd block" please see this log i've made with GLIntercept. /* tons of wglGetProcAddress* */ wglGetProcAddress("glEndOcclusionQueryNV")=087C9B10 wglGetProcAddress("glBeginTransformFeedbackN...")=087C9ED0 wglGetProcAddress("glEndTransformFeedbackNV")=087C9F00 glPushAttrib(GL_VIEWPORT_BIT) glPushAttrib(GL_COLOR_BUFFER_BIT) glPushAttrib(GL_COLOR_BUFFER_BIT) glPopAttrib() glPopAttrib() glGetError() = GL_INVALID_OPERATION # <---- THIS glPopAttrib() glPushAttrib(GL_VIEWPORT_BIT) glPushAttrib(GL_COLOR_BUFFER_BIT) glPushAttrib(GL_COLOR_BUFFER_BIT) glPopAttrib() glPushAttrib(GL_POINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT) glPopAttrib() glPopAttrib() glPopAttrib() glPushAttrib(GL_VIEWPORT_BIT) glPushAttrib(GL_COLOR_BUFFER_BIT) glPushAttrib(GL_COLOR_BUFFER_BIT) glPopAttrib() glPopAttrib() glPopAttrib() /* and so on */ No glBegin/glEnd callings are made before error-causeing glPopAttrib(). (I used findstr commad to filter the log). The error appears only once, no such (or others) error appers again during the code execution. I have an suspicion that i should call some function before glPushAttrib(GL_VIEWPORT_BIT) or something. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I was having the same problem, and finally figured out the cause: When you call a glBindFramebuffer between a glPushAttrib(GL_COLOR_BUFFER_BIT) and a glPopAttrib, a GL_INVALID_OPERATION is caused on the glPopAttrib call. This even happens when you restore the original frame buffer binding before calling glPopAttrib. The only solution seems to be either avoid all glBindFramebuffer calls between the glPushAttrib and glPopAttrib, or avoid using glPushAttrib and glPopAttrib by storing and restoring all relevant color buffer state manually.

Related questions

0 votes
    When I get a vanilla Windows system, there's a bunch of stuff I change to make it more developer- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 7, 2022 in Education by JackTerrance
0 votes
    When I get a vanilla Windows system, there's a bunch of stuff I change to make it more developer- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 7, 2022 in Education by JackTerrance
0 votes
    When I get a vanilla Windows system, there's a bunch of stuff I change to make it more developer- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 6, 2022 in Education by JackTerrance
0 votes
    When I get a vanilla Windows system, there's a bunch of stuff I change to make it more developer- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 6, 2022 in Education by JackTerrance
0 votes
    I am working on a C++ program, which uses cURL library, which is written in plain C. When I try ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    I am writing a program that uses the XGetPixel() method. However, upon using it I get an error ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 27, 2022 in Education by JackTerrance
0 votes
    This is the document of the function cv::fisheye::initUndistortRectifyMap I don't know what the R is. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    All compilers I could get my hands on agree that this is fine: template auto foo(Check, T...) - ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    Let's say that I declare a C struct called foo, which has an int field called bar and a char * ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    I want to be able to zoom in my QtCharts using the mouse. The best way to zoom using the mouse ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    I work on graphics applications and have been using shared & unique pointers essentially because it handles memory ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I have a QGraphicsItem element (subclassesed from QGraphicsItem) that has as child a QGraphicsTextItem. The problem ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    I've been trying for some time now to get a screen-space pixel (provided by a deferred HLSL ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    // merge.cpp // merges two containers into a third #include #include //for merge() using namespace std; int src1[] = { 2, 3, 4, ... , src1+5, src2, src2+3, dest); for(int j=0; j...
asked Jun 2, 2022 in Education by JackTerrance
...