maverick9888
maverick9888

Reputation: 512

Using GL_RGB10_A2UI internal format in glCopyTexImage1D() OpenGL 3.3

I am using GL_RGB10_A2UI internal format in glCopyTexImage1D() API but getting GL_INVALID_OPERATION error. Does OpenGL 3.3 support GL_RGB10_A2UI in glCopyTexImage1D() ?

Upvotes: 1

Views: 354

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473322

GL_RGB10_A2UI is an integral image format; it contains integers, not normalized floating-point values that are stored as integers. Therefore, unless your framebuffer also contains unsigned integer values, this copy operation will fail with the expected error.

Of course, the only way for your framebuffer to have unsigned integers (rather than unsigned normalized integers, which is the usual case) would be to use an FBO. In which case, you could just be rendering directly to this texture, and you wouldn't need to copy from it.

I'm guessing you probably meant to use GL_RGB10_A2, which represent unsigned normalized values.

Upvotes: 3

Related Questions