nevermind this error is getting triggered way before this piece of code
but it would be useful to know how to pinpoint the function that is causing this log entry, currently Im just placing glgeterror() all over the place and I think this error is getting triggered in my SDL initialization
but it would be useful to know how to pinpoint the function that is causing this log entry, currently Im just placing glgeterror() all over the place and I think this error is getting triggered in my SDL initialization
There is a helpful extension - debug_output, but you'll need to upgrade your drivers to GL 4.1.
Define debug callback function, activate synchronous output and add a breakpoint inside callback function. Whenever an error occurs you'll have a function caused it in the call-stack.
[quote name='EvilNando' timestamp='1306780725' post='4817609']but it would be useful to know how to pinpoint the function that is causing this log entry, currently Im just placing glgeterror() all over the place and I think this error is getting triggered in my SDL initialization
There is a helpful extension - debug_output, but you'll need to upgrade your drivers to GL 4.1.
Define debug callback function, activate synchronous output and add a breakpoint inside callback function. Whenever an error occurs you'll have a function caused it in the call-stack.
You might still get GL_INVALID_ENUM (depending on the version of GLEW you use), but at least GLEW ignores glGetString(GL_EXTENSIONS) and gets all function pointers.[/quote]
Sig: http://glhlib.sourceforge.net an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);