I try to use GL_EXT_texture_buffer_object but I can’t figure out how it is supose to work… I’m kind of surprise by this extension spectication, it doesn’t seam completed and all the GLSL part of it is written in the GL_EXT_gpu_shader4 extensions… Well maybe.
I think to access to data save in a texture buffer object we have to use in GLSL this:
uniform samplerBuffer MySamplerBuffer;
int Index = …
vec4 Displacement = texelFetchBuffer(MySamplerBuffer, Index);
But: What if the format of the texture buffer is GL_ALPHA? It is even possible?
On the C++ side my understanding is unfortunatly worse.
This is what I have written to create this texture buffer:
glBufferData(GL_TEXTURE_BUFFER_EXT, sizeof(Array), Array, GL_STATIC_DRAW);
This should have create my buffer object. I’m not sure it is good but I haven’t any error. Then I create a texture object like that:
glTexBufferEXT(GL_TEXTURE_BUFFER_EXT, GL_RGBA, bufferObject);
However I have an error on “glTexBufferEXT” call…