Trapping OpenGL Crash

BlitzMax Forums/BlitzMax Programming/Trapping OpenGL Crash

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

OpenGL does generate error codes.

see glGetError()

If you do ANYTHING wrong, an error code is generated.

When glGetError()=GL_NONE there is no error, otherwise it's an error code that matches some other symbolic constant such as GL_INVALID etc. You should be checking the errors to make sure your display was set up right etc and there was nothing that went wrong. If you keep tabs on the errors it might clue you in as to what exact instruction(s) are causing problems.