PDA

View Full Version : Best Practice ? ...



Andrew Jameson
04-22-2003, 03:53 AM
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

mikael_aronsson
04-22-2003, 04:14 AM
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

JD
04-22-2003, 11:44 PM
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.