View Full Version : sub-bindings with GL_SHADER_STORAGE_BUFFER

02-02-2014, 07:00 PM

How can I access a particular buffer at a specific sub-binding for GL_SHADER_STORAGE_BUFFER when doing a map out?

For example, in the example below, there is no place to specify the sub-binding.

char* output=(char *)glMapBuffer(GL_SHADER_STORAGE_BUFFER,GL_READ_ONL Y);

If my shader storage buffer had two buffers associated with it at two different binding point, how could I just map out the buffer at sub-binding point 1?

glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, shader_buffer[0]);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, shader_buffer[1]);

02-10-2014, 10:37 AM
from the docs, there is no way to do this it seems...