In general, you need to know which OpenGL calls are being issued in your code. This involves digging into the code. There's nothing in the pixel_buffer_object spec that indicates glMatrixMode would cause an invalid enum (you can and should verify this in the extension registry at opengl.org), and I don't experience the error myself. It's possible the code is using some extension functionality without checking to make sure your system supports the feature. If this is the case, then please submit a fix.

Update your device driver. Check your system's supported features with GLView.

The fact that the error goes away when you add the glGetError call, but you never trip the assert, implies you have compiled your code with the asserts disabled. Check your compiler documentation to make sure you've enabled the asserts. Maybe you built Release mode in Visual Studio, for example?

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466



Mark Jones wrote:
How do I track down what is causing this error?

Below is some sample output from running osgScreenCapture with different 
options, note that any pbo option causes the error, but I'm sort of at a loss 
on figuring out what the error might be.


--no-pbo
Reading window usig glReadPixels, with out PixelBufferObject.
fps = 9.549, full frame copy = 8.4498ms rate = 208.76 Mpixel/sec, copy speed = 
597.28 Mb/sec
fps = 9.5965, full frame copy = 8.8676ms rate = 198.93 Mpixel/sec, copy speed 
=569.13 Mb/sec
fps = 9.5432, full frame copy = 8.1697ms rate = 215.92 Mpixel/sec, copy speed 
=617.75 Mb/sec
fps = 9.5415, full frame copy = 8.6215ms rate = 204.6 Mpixel/sec, copy speed = 
585.38 Mb/sec

--single-pbo
Warning: detected OpenGL error 'invalid operation' at start of State::apply()
fps = 59.232, full frame copy = 1.1492ms rate = 1534.9 Mpixel/sec, 4391.4 
Mb/sec time for memcpy = 1.1446ms  memcpy speed = 4409.4 Mb/sec
Warning: detected OpenGL error 'invalid operation' at start of State::apply()
fps = 57.98, full frame copy = 11.127ms rate = 158.54 Mpixel/sec, 453.57 Mb/sec 
time for memcpy = 1.2396ms  memcpy speed = 4071.4 Mb/sec

--double-pbo
Warning: detected OpenGL error 'invalid operation' at start of State::apply()
fps = 57.645, full frame copy = 10.735ms rate = 164.32 Mpixel/sec, 470.11 
Mb/sec time for memcpy = 1.409ms  memcpy speed = 3581.8 Mb/sec
fps = 57.613, full frame copy = 1.1572ms rate = 1524.4 Mpixel/sec, 4361.4 
Mb/sec time for memcpy = 1.154ms  memcpy speed = 4373.2 Mb/sec

--triple-pbo
Warning: detected OpenGL error 'invalid operation' at start of State::apply()
fps = 59.373, full frame copy = 10.03ms rate = 175.87 Mpixel/sec, 503.17 Mb/sec 
time for memcpy = 1.2871ms  memcpy speed = 3921.2 Mb/sec
fps = 59.397, full frame copy = 1.122ms rate = 1572.2 Mpixel/sec, 4498 Mb/sec 
time for memcpy = 1.1189ms  memcpy speed = 4510.6 Mb/sec




Below is the code that "appears" to be causing the problem, however when I add 
the glGetError() after each of the gl Calls, then the problem goes away, AND errorNo is 
always 0 because the assert never triggers


Code:


    inline void applyProjectionMatrix(const osg::RefMatrix* matrix)
    {
        if (_projection!=matrix)
        {
            GLenum errorNo = glGetError();
            assert(errorNo == 0);
            glMatrixMode( GL_PROJECTION );
            errorNo = glGetError();
            assert(errorNo == 0);
            if (matrix)
            {
                _projection=matrix;
                glLoadMatrix(matrix->ptr());
                errorNo = glGetError();
                assert(errorNo == 0);
            }
            else
            {
                _projection=_identity;
                glLoadIdentity();
                errorNo = glGetError();
                assert(errorNo == 0);
            }
            glMatrixMode( GL_MODELVIEW );
            errorNo = glGetError();
            assert(errorNo == 0);
        }
    }






PS, why are there all those goofy characters in the code?  I converted all the 
tabs to spaces before I pasted the code in!?![/quote]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21894#21894





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to