matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
491 stars 72 forks source link

ssbo setup/update #76

Open regnirpsj opened 10 years ago

regnirpsj commented 10 years ago

how would i setup and update a shader-storage buffer object defined like this:

struct light_t { /* lots of attributes */ };

layout (std430) buffer light_list_t {
  light_t light_list[];
};

i only seem to find examples using uniform buffer objects but not shader-storage buffer objects. or did i grep in the wrong places?

matus-chochlik commented 10 years ago

There is no example of SSBO yet. I'll have to think of something.

regnirpsj commented 10 years ago

well, a list of lights or materials would be my standard use case. thanks for picking this up.

regnirpsj commented 9 years ago

any progress on this one? i've seen some change in the source tree with respect to ssbo enums but still don't see an example. i'm willing to clone an exisiting example and tinker with it if pointed in any/some/certain direction.

matus-chochlik commented 9 years ago

Well, sadly no, I've been busy with some other things. I'll give this a bump on the TODO list. But of course any contributions are welcome, don't hesitate to contact me if you need some help.

regnirpsj commented 9 years ago

hi matus,

i implemented ssbo support based on uniform blocks. could you have a look at [e1506e71c3611d7c13c9f243adf5dbec05fe11cb] and tell me what you think?

matus-chochlik commented 9 years ago

Hi, it's looking good! If you create a pull request (preferably based on current develop) I'll merge the changes. Thanks.