Original Post
i''m a little bit confused about glGetError()...
well... here''s my code : (did some just for problem-testing)
...
glFinish();
glGetError();
Frustum->Update();
...
so every error-message should be ''deleted'', right ?
now i call Frustum->Update()...
void nxFrustum::Update()
{
float clip[16];
float proj[16];
float modl[16];
float t;
float save[16];
glFinish();
(1) -> int r = glGetError();
if (r != 0) printf ("ERROR ! %i\n", r);
glGetFloatv (GL_PROJECTION_MATRIX, proj);
glGetFloatv (GL_MODELVIEW_MATRIX, modl);
(2) -> glMatrixMode (GL_MODELVIEW_MATRIX);
//glPushMatrix();
glGetFloatv (GL_MODELVIEW_MATRIX, save);
...
and the glGetError() that i marked (1) returns an error (GL_INVALID_ENUM). HOW CAN THIS BE ??? since i''ve used glFinish() before the first glGetError() and before the glGetError() in the Frustum->Update function, there should no queued GL-commands be interfering, right ? so how is it possible that it reports an error, if the first glGetError() (before call to update) didn''t report any ? i found out, that the error is to be found at the glMatrixMode() command (after a lot of try & error), but still... how can the glGetError() report the error, BEFORE it happened ? (maybe some sort of ''Fortune-Telling-Algorithm'' in here ?)
another strange thing was, that it also reported GL_INVALID_ENUM for a glPushMatrix() call, when the stack was full... shouldn''t this be GL_STACK_OVERFLOW or so ?