1
votes

I'm using the LWJGL, and the following OpenGL call causes an Invalid Enum error when checked with Util.checkGLError()

GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);

I've narrowed it down to the GL_CLAMP, since GL_REPEAT Works. It should also be noted that GL_CLAMP works fine on my laptop, but the error comes in when I'm running it on my desktop. The desktop has a Raedon 5700. Is this a known driver issue or something?

1
I'm pretty sure that it was on an older version of opengl|es but maybe its similar to this case. I remembered there were some kind of limitation with GL_CLAMP and i think it has something to do with the texture must be power of 2. Again this is just a wild guess and maybe something to try out.dowhilefor
Have you taken a look at the OpenGL Manual Pages? opengl.org/sdk/docs/man/xhtml/glTexParameter.xmlOskar

1 Answers

1
votes

Here's an idea: stop using GL_CLAMP. What you really want is GL_CLAMP_TO_EDGE anyway. GL_CLAMP doesn't do what you think it does.

If you've somehow created a core OpenGL context with LWJGL, then that's probably why you're getting GL_INVALID_ENUM. Because GL_CLAMP was removed from core OpenGL back in 3.1.