Hi Luca,
Take a look at the osgSSBO example. The ShaderStorageBufferCallback can
be used to retrieve the results.
You might have to add a
|glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT); in order to retrieve the
result a the correct moment. See the osggpucull example for the barrier
usage. |
Hi all,
for an university project I'm trying to set up a compute shader to execute some
computation writing results to a shader storage buffer object.
I tried to run a trivial shader code where the data passed to the shader is a
float array of 10 elements initialiazed at 1. At execution time one element,
for example position 0, is changed to another value.
I don't know to read back data from ssbo into my application code where I need
the data computed by the shader.
I'm pretty sure the shader is correctly executed and the ssbo correctly passed
to it.
...
Thank you!
Cheers,
Luca
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67072#67072
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org