I am using glGenBuffers
,which creates a handle/s that is used to refer to the buffer when talking to gl.Can I use the handle to read the content of the buffer/s?
If yes - how?
There are two ways to read data from a Buffer Object. There is glGetBufferSubData
, which directly copies buffer data into a pointer of your choice.
You can also map the buffer for reading. That requires using glMapBufferRange
(or glMapBuffer
if you're old-school), which you can use to get a pointer to the buffer objects data and read directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With