[osg-users] Read back data from a storage buffer object
Sebastian Messerschmidt
sebastian.messerschmidt at gmx.de
Wed May 11 03:49:45 PDT 2016
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
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160511/ac6aab41/attachment-0002.htm>
More information about the osg-users
mailing list