Buffer Read / s - OpenGL

I use glGenBuffers , which creates the / s descriptor, which is used to refer to the buffer when talking to gl.Can I use the descriptor to read the contents of the / s buffer? If so, how?

+4
source share
1 answer

There are two ways to read data from a Buffer Object . There is glGetBufferSubData that directly copies the buffer data to the pointer of your choice.

You can also display a buffer for reading . This requires glMapBufferRange (or glMapBuffer if you're old school), which you can use to get a pointer to the data of buffer objects and read directly.

+6
source

Source: https://habr.com/ru/post/1396868/


All Articles