GL_INVALID_OPERATION mystery!

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
kazade
Insane DCEmu
Insane DCEmu
Posts: 145
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Tue May 02, 2017 3:11 pm
Has thanked: 3 times
Been thanked: 34 times

GL_INVALID_OPERATION mystery!

Post by kazade »

So, here's a fun one. I'm receiving the following error from my code:

Code: Select all

KOS GL ERROR THROWN BY FUNCTION: glDrawArrays

KOS GL ERROR: GL_INVALID_OPERATION
Firstly, I'm not using glDrawArrays, but that's understandable as glKosArraysVerifyParameter is called by glDrawElements and glDrawArrays but only logs glDrawArrays.

The weird thing is, GL_INVALID_OPERATION is never raised by glDrawArrays! Here's a grep of the code for GL_INVALID_OPERATION

Code: Select all

gl-framebuffer.c:        _glKosThrowError(GL_INVALID_OPERATION, "glFramebufferTexture2D");
gl-framebuffer.c:        _glKosThrowError(GL_INVALID_OPERATION, "glFramebufferTexture2D");
gl-framebuffer.c:        _glKosThrowError(GL_INVALID_OPERATION, "glFramebufferTexture2D");
gl-texture.c:                            _glKosThrowError(GL_INVALID_OPERATION, "glCompressedTexImage2D");
gl-texture.c:        _glKosThrowError(GL_INVALID_OPERATION, "glCompressedTexImage2D");
gl-texture.c:        _glKosThrowError(GL_INVALID_OPERATION, "glTexImage2D");
gl-texture.c:        _glKosThrowError(GL_INVALID_OPERATION, "glTexImage2D");
gl-texture.c:                _glKosThrowError(GL_INVALID_OPERATION, "glTexImage2D");
I've been looking through the code, but I can't see how this can happen. I thought perhaps it's because KOS_GL_ERROR_CODE isn't initialized, but setting it to zero doesn't help.

Any ideas?
kazade
Insane DCEmu
Insane DCEmu
Posts: 145
Joined: Tue May 02, 2017 3:11 pm
Has thanked: 3 times
Been thanked: 34 times

Re: GL_INVALID_OPERATION mystery!

Post by kazade »

Ah! Ignore me, my *fork* doesn't throw GL_INVALID_OPERATION - but I'm not using my fork. Duh!
Post Reply