Help! My program doesn’t run properly in Release
(Debug) mode!
When
a program works in Debug mode, but not Release mode, there is usually some sort
of memory error, or error with OpenGL.
Solution: use
glGetError() to
try to determine if/where an error is occurring
- For example, put GLenum e = glGetError(); in your Game::Render() method.
- If an error is generated, work back (as
discussed in Lecture 2) to find what is causing the error.
Examples
- Binding to an unallocated texture causes
error GL_INVALID_OPERATION (1282)
- Setting uniforms in programs that are not
being used (through glUseProgram)
causes error GL_INVALID_OPERATION (1282)