<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Luca, <br>
<br>
Take a look at the osgSSBO example. The
ShaderStorageBufferCallback can be used to retrieve the results. <br>
You might have to add a <br>
<pre style="" class="lang-c prettyprint prettyprinted"><code><span class="pln">glMemoryBarrier</span><span class="pun">(</span><span class="pln">GL_SHADER_STORAGE_BARRIER_BIT</span><span class="pun">);
in order to retrieve the result a the correct moment. See the osggpucull example for the barrier usage.
</span></code></pre>
</div>
<blockquote cite="mid:1462962619.m2f.67072@forum.openscenegraph.org"
type="cite">
<pre wrap="">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:
<a class="moz-txt-link-freetext" href="http://forum.openscenegraph.org/viewtopic.php?p=67072#67072">http://forum.openscenegraph.org/viewtopic.php?p=67072#67072</a>
_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>