Best Practice ? ...

Hi,
Just tidying up an application and need confirmation / information as to whether this line is essential within the main draw routine …

repeat
fErrorCode := glGetError;
until (fErrorCode = GL_NO_ERROR);

Andrew

Hi !

No, you can remove it, it will just read all the error codes (if any), but as you don’t do anything with the information you might as well remove the code.

Mikael

Also, don’t try to get values from gl if you can avoid it. Sometimes you can stall the hw pipe and getting the info from video card over the bus to system memory is very slow. Cache the info yourself. Sometimes you can grab info from vid card but time the results to see if it’s not the bottleneck in your app.