openframeworks/openFrameworks — pull request #3289 by arturoc (2014-10-06 09:58:35+00:00)
Title: ofBufferObject: openGL buffer objects

Adds a new ofBufferObject class that represents an openGL buffer. This
can be used for several purposes like passing info to a shader, upload
and download data asynchronously and even multithreaded.

ofVbo is refactored to used this class which simplifies greatly it's logic.

There's methods to copy from/to textures and buffer objects, assign an external
buffer object to a vbo, bind a texture as an image so it can be accessed for read and
write from shaders...

There's also a couple of examples using buffer objects and compute shaders.

One is a particle system calculated in a compute shader where the particle
data is uploaded as a shader buffer and then passed into a vbo for rendering

The other a simple thresholding done in a compute shader and then downloaded
through a pixel buffer object to do a contour detection in the cpu