I am currently having an issue with OpenGL as I am trying to load some vector information into a 3D texture. Currently, I am developing in OpenGL 4.6 which should support Image bindings.
this my code to bind the texture to an image:
glGenTextures(1, &field_sbo);
glBindTexture(GL_TEXTURE_3D, field_sbo);
glTextureStorage3D(field_sbo, 1, GL_RGB32F, 10,10,10);
glTextureSubImage3D(field_sbo, 0, 0, 0, 0, 10, 10, 10, GL_RGB, GL_FLOAT, vector_data);
glBindImageTexture(0, field_sbo, 0, GL_TRUE, 0, GL_READ_ONLY, GL_RGB32F);
Additionally, this is the declaration in the compute shader:
layout(binding = 0, RGB32F) uniform image3D field;
From my understanding, the glTextureStorage3D should make the texture immutable, however I keep getting an INVALID_VALUE at the glBindImageTexture stage. I have looked at the documentation for the errors however I cannot seem to fix the issue.