[osg-users] [osgCompute] osgCompute restrictions
Hi, In the osgCompute home page it is mentioned that The Driver API is currently not supported by osgCuda what exactly does it mean? I have the latest nvidia driver installed on gtx 560m and cuda tool-kit 4.2. Would someone put more light on to this ? Thank you! Cheers, Sajjadul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53511#53511 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Reading from a texture in a compute shader
I have digged into this a little further and using glIntercept I learned that glDispatchCompute ends up being executed before the flowers texture has been bound. Adding a second quad to the scene with the flowers texture on texture unit 1 before the compute node fixes the problem, but is hardly ideal. Is OSG delaying texture switches until it sees actual geometry somehow? If that is the case, then some sort of check for compute shaders might need to be added so that texture attributes on the path to a compute program are executed before glDispatchCompute. Can someone perhaps point me in the right direction on how to fix this or maybe suggest a better solution? I am on 3.1.4, btw and it doesn't look like there have been any changes to compute shaders since its release. Cheers, Michael P.S.: I would like to use this for a histogram compute pass using Wang Rui's excellent EffectCompositor, which I have altered a bit to get compute shader support. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53512#53512 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Reading from a texture in a compute shader
HI Michael, The glDispatchCompute is called from with osg::Program, which is subclassed from osg::StateAttribute and largely treated as a standard StateAttribute by osg::State the tracks and applies OpenGL state. I haven't tried compute shaders as my GL drivers don't yet support them, but looking at the code in State::apply() that applies StateAttributes, it looks like non texture StateAttrbitutes are applied first and then texture attributes. You could experiment with moving the code blocks for applying the texture unit assocaites state attributes to before the non texture state attributes to see if that address the issue. The code is in OpenSceneGraph/src/osg/State.cpp's State::apply() and State::apply(StateAttribute*) methods. Robert. On 10 April 2013 14:14, Michael Bach Jensen mich...@ifad.dk wrote: I have digged into this a little further and using glIntercept I learned that glDispatchCompute ends up being executed before the flowers texture has been bound. Adding a second quad to the scene with the flowers texture on texture unit 1 before the compute node fixes the problem, but is hardly ideal. Is OSG delaying texture switches until it sees actual geometry somehow? If that is the case, then some sort of check for compute shaders might need to be added so that texture attributes on the path to a compute program are executed before glDispatchCompute. Can someone perhaps point me in the right direction on how to fix this or maybe suggest a better solution? I am on 3.1.4, btw and it doesn't look like there have been any changes to compute shaders since its release. Cheers, Michael P.S.: I would like to use this for a histogram compute pass using Wang Rui's excellent EffectCompositor, which I have altered a bit to get compute shader support. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53512#53512 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgAndroidExample
Hi community, I have succeeded building and installing the sample GL ES1/2 samples on android and when I try to run it, it starts, it shows the buttons and immediately it goes away (close without complaining). I went thru the code and I am not seeing where the models are loaded (or is it interactive via menu or such). Please note I know OSG to some point but new to mobile device development so please talk to me as to a child on this. Shell I copy the models somewhere so they are loaded? What is the assets folder for? I am running Ubuntu 64 with Eclipse and the Android NDK/SDK. Thanks for any hints that will help Cheers, Nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAndroidExample
Hello, On Wed, Apr 10, 2013 at 3:51 PM, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi community, I have succeeded building and installing the sample GL ES1/2 samples on android and when I try to run it, it starts, it shows the buttons and immediately it goes away (close without complaining). Have a look at the part of the OSG documentation about the Neon instruction support. If you are running the code on a device with a Tegra 2 chipset (maybe some others), then it will cause this type of crash because that instruction set isn't supported on Tegra 2. Either compile for the version 5 ABI (armeabi - which doesn't use Neon) or disable the Neon instruction set according to the instructions in the doc. I went thru the code and I am not seeing where the models are loaded (or is it interactive via menu or such). It is interactive, in the menu you have load model, then you type the path to the model file into a popup window (.ive) there, e.g. /mnt/sdcard/cube.ive. If everything goes well, the model will load and display. Please note I know OSG to some point but new to mobile device development so please talk to me as to a child on this. Shell I copy the models somewhere so they are loaded? For the demos you should likely put the models somewhere on the sdcard because you will have to enter that path in the file loading dialog. What is the assets folder for? That folder contains additional files (assets), such as models, sounds, icons, etc. that get packaged into the application APK and installed with it when you install the application. Then you can access them from the Java code using handles. Don't put your models there, it isn't possible to directly load files from C++ code using that folder. Well, strictly speaking it is possible, but it requires some major hacking to discover the Linux filesystem path of the folder before you can access files there. Have a look at the Android SDK documentation, it explains what are these various folders for and how an Android application works. Starting mobile app development with OSG as your first project is a really terrible idea due to the complexity - try some of the SDK examples first, then the examples from the NDK so that you understand how things fit together. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multipass rendering with shader
Hi, i'm wondering if is it possible to apply different shaders (vertex and fragment) on the same osg::Node (not entire scene as RTT image) in this way : The result (ouput) of the first vertex/fragment shader must be used as input of the second vertex/fragment shader. In example, i have used a vertex and fragment to get refraction effect. But, unless i write the proper vertex/fragment code in this refraction shader, i loose lights setting coming from osg code. I would like to set lights using a shader (vertex/fragment) on the osg::Node already affected by refraction shader. Is there any example that show how to get it? Thank you! Cheers, Andrea -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53516#53516 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Integration of stereo and distortion correction into osgViewer
Hi Rafa, On 3 April 2013 09:48, Rafa Gaitan rafa.gai...@gmail.com wrote: I'm not sure if the refactor will affect the way that stereo will be managed, but currently also exists auto-stereoscopic displays, which means that not only find the classical two-view stereo but many views (8 or 9 are the most common) and even in mobile devices it's also possible to find auto-stereoscopic displays. What is the layout of the views? Are they all horizontal, or arranged in a grid? Do they form and arc or in a plane? The reason for my question is I'm currently working on a slave update callback that computes the projection and view matrix offsets per frame, and believe that one callback class could be used for both stereo and multiple views. For each slave camera we instantiate this callback, each time with a different horizontal and vertical offset scale to specialize it specifically for that camera's eye offset. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] build osgmotionblur
Hi, I've been using OSG successfully for a while now. Unlike all other examples I've tried, example osgmotionblur uses OpenGL functions and I'm not able to build it. Should I install and include OpenGL library too? Also, I could replace glClearColor and glClear with OSG's counterparts, but I don't know how to replace glAccum. Thanks for the help. Cheers, Alfonso ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgCompute] osgTraceDemo
Hi forum, I am getting the following error while trying to run the osgTraceDemo. Code: InputStream::readObject(): Unsupported wrapper class osgCuda::Program Computation::loadComputation(): cannot find dynamic library osgcuda_ptclemitter. Computation::loadComputation(): cannot find dynamic library osgcuda_ptcltracer. [2]+ Done./osgTexDemo The rest of the examples executed fine. Any idea ? Thank you! Cheers, Sajjadul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53520#53520 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org