LWJGL
May 18, 2013, 08:05:10 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Checking for errors  (Read 1934 times)
chaosdeathfish
Newbie
*
Posts: 6


« on: September 02, 2005, 18:47:14 »

I'm getting really irritated by error checking in LWJGL. In particular, it bugs me that I have to call glGetError() to find out if an error has occurred (i.e. I passed the wrong parameter to a method). I try to avoid using this to avoid the JNI overhead, but this means the error isn't reported until I call Display.update(), so I have to start putting Util.checlGLError() all through my code until I find the bug.

How about putting in each GL method an assert such as:
Code:
assert GL11.getGLError() != GL11.GL_NO_ERROR;

That way, we could just turn asserts on while developing to detect errors early, or switch them off for performance.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!