Dark Squirtings
Dark Squirtings

Reputation: 198

OpenGL: GL_CLAMP causing Invalid Enum error

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?

Upvotes: 1

Views: 1097

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474116

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.

Upvotes: 1

Related Questions