<<< GL naming conventions | Index | OpenGL State Machine >>> |
Because of Client/Server architecture, OpenGL can be hard to debug.
Note: invalid function calls are quietly disregarded
Best advice: apply small changes, compile and test often.
Use glGetError() to determine which error has occurred:
GL_NO_ERROR GL_INVALID_OPERATION // your command is ignored!! GL_INVALID_ENUM GL_INVALID_VALUE GL_OUT_OF_MEMORY
For example,
GLenum error_code = glGetError(); if ( error_code != GL_NO_ERROR ) { /*...*/ }
<<< GL naming conventions | Index | OpenGL State Machine >>> |