Thomas
Thomas

Reputation: 6196

invalid operation error from glTexImage3D call

        glTexImage3D(GL_TEXTURE_3D,
                0,
                GL_R8I,
                4,
                4,
                4,
                0,
                GL_RED,
                GL_BYTE,
                (ByteBuffer)null);

This throws the invalid operation error (got from glGetError).

If I change the R8I to R8, no error is thrown.

Im trying to get integers fetched from the texture and the normalize format of R8 does not work for me.

WHy is R8I throwing an error when the specification seems to say that R8I is an acceptable format for this call.

I am using LWJGL for openGL.

Upvotes: 0

Views: 340

Answers (1)

ebbs
ebbs

Reputation: 435

GL_R8I is an integer format and should be used along with GL_RED_INTEGER instead of GL_RED.

Upvotes: 4

Related Questions