glGetError Doesn't Work

Hi,

Recently, a problem cropped up in PyOpenGL–namely that it wouldn’t raise OpenGL errors as exceptions (PyOpenGL checks with glGetError after every call).

I realized that it wasn’t just PyOpenGL. I wrote a C++ program, and glGetError constantly returns 0 (even after glViewport(0,0,-800,-600), etc.). My test applications had valid contexts, etc., and worked as expected for other people.

So, apparently, my problem is specific to me. I’ve tried everything I can think of–including rolling back/re-updating video card drivers.

Any hints at all???

Thanks,
Ian

I saw recent Nvidia drivers for Windows that default to never report GL_ERROR, with an excuse like “to optimize performance”…
This “optimization” can be turned off in the display control panel.

You need to have active GL rendering context to read error code.

I saw recent Nvidia drivers for Windows that default to never report GL_ERROR, with an excuse like “to optimize performance”…
This “optimization” can be turned off in the display control panel.

Oh, you’ve got to be kidding.

You need to have active GL rendering context to read error code.

He also needs an active GL RC to call glViewport, so I doubt that’s his problem.

Unfortunately no, this is not a joke.
To be precise, it is called “Error Reporting” and defaults to off :
http://www.tweakguides.com/NVFORCE_6.html

I think it’s possible I turned this off, and it would certainly explain the problem.

Though I did forget to mention it, I actually did look for the setting a while ago, but I couldn’t find it. Here’s a picture of my card’s control panel: Control Panel

Hah–fixed it!

Because this display control panel doesn’t have the error reporting option, I installed a previous display driver, which also installs a version of the display control panel that includes the error reporting option. I then turned error reporting off, which actually turns it on.

Well then. Thanks!

Do you have the driver versions for the with/without reporting options ?

That is a bad move from nvidia to disable GL_ERROR reporting, and even worse without providing an option to put it back…

All,

We’ll look at this asap. Thanks for reporting this.

Barthold
(with my NVIDIA hat on)

We found the issue, and are working on a fix.

Barthold
(with my NVIDIA hat on)