Hi,
I’ve tried to create a 1-dimensional texture with GL_R32UI internal format but the glTexImage1D function returns with “invalid operation”.
vector<GLuint> faces;
...
glTexImage1D(GL_TEXTURE_1D, 0, GL_R32UI, faces.size(), 0, GL_RED, GL_UNSIGNED_INT, &faces[0]);
Originally my SDL-OpenGL header file doesn’t contain the gl3 R32UI define, but I declared it myself, as the OpenGL registry defines:
#define GL_R32UI 0x8236
I’ve tried different formats (like GL_R32UI instead of GL_RED, of course it failed) and different types, but I couldn’t solve the problem, gluErrorString reports “invalid operation”.
The glTexImage1D documentation doesn’t say anything about GL_R32UI-specific errors, as it’s relatively new and the documentation doesn’t contain it yet.
My question is what could cause the problem and what should I do? I want to use integral textures in my fragment shader with more than 16-bit components and I don’t want to distribute the bits amongst three or four 8-bit components (like in RGBA).