I've been looking at Interface queries in order to prevent common mistakes that are time consuming to debug, such as forgetting to bind a buffer, binding the wrong resource type, etc.
However, I wasn't able to find what I wanted for images. I'd like to make sure that the type of the texture, the memory qualifier and the texture format are the same in the c++ code and in the shader :
glBindImageTexture(index, texture, 0, true, 0, GL_READ_ONLY, GL_RGBA32F); layout(binding = 0, rgba32f) uniform writeonly iimage2D _heightmap;
Using glGetProgramResourceiv with GL_UNIFORM and GL_TYPE, I was able to get the type of the image, iimage2D. But nothing for the memory qualifier and the image format.
Is there a way to do that, other than parsing the shader?