Re: [osg-users] geometry indexes?

2012-01-17 Thread Robert Osfield
HI Akilan, On 17 January 2012 05:04, Akilan Thangamani akilan.thangam...@gmail.com wrote: Is there any easy way to find vertices's index for the shapes like Cone, Cube etc., in osg::shape? Otherwise, should it be done thru graph note book only? The osg::Shape subclasses don't have any

[osg-users] osgViewer::RecordAnimationPath without file

2012-01-17 Thread Philipp Moeller
Hello list, osgViewer::RecordAnimationPath will always store the AnimationPath to a file. This looks very limited to me. For my use-case extracting a osg::AnimationPath would be enough and it seems possible to extend the current interface with this functionality. Otherwise it would be nice, if

Re: [osg-users] osgViewer::RecordAnimationPath without file

2012-01-17 Thread Robert Osfield
Hi Phillipp, RecordAnimationPath is just a simple utility class. It's quite easy to roll your own so this may well be the most convenient way for your to do it. Alternatively you could just modify the existing class to just populate an AnimationPath and now write out to disk. Robert. On 17

Re: [osg-users] Dynamic surface coloring

2012-01-17 Thread Kevin Williams
image-dirty() does it. Thanks JP. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44875#44875 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Is a render to texture master camera critical?

2012-01-17 Thread Martin Großer
Hello all, A few weeks ago, I want to render my scene into a texture, which I want to use in the final rendering on a screen aligned quad. My first problem was I lost the shadows, because view dependent shadow techniques don't work with nested cameras. So I used a RTT slave camera. Now my

Re: [osg-users] Is a render to texture master camera critical?

2012-01-17 Thread Jean-Sébastien Guay
Hello Martin, So now my rtt camera is the master camera and my ortho camera for the quad is a nested camera (see the render_to_texture_scene_graph.png). It looks fine, but I am not sure whether it is a good idea. That's always how I've done it too. I think it's fine. For me, the motivation

[osg-users] Help:what is openGl shader version 140?

2012-01-17 Thread wang shuiying
Hello, my shader compile stage throws out such warnings: 0(8) : warning C7532: global type sampler2DRect requires #version 140 or later 0(8) : warning C: ... or #extension GL_ARB_texture_rectangle : enable and Then I add #version 140 #extension GL_ARB_texture_rectangle : enable at the

[osg-users] Help: wrong ouput from frag shader.

2012-01-17 Thread wang shuiying
Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image: float Vec4: (0.176471,0,0,1) so why 0.174977 changed into 0.176471? I think there should be no process there after per fragment operations that can change this element in the

Re: [osg-users] Is a render to texture master camera critical?

2012-01-17 Thread Martin Großer
Hello Jean-Sébastien, yes, it helps. :-) thank you very much for your feedback. Cheers Martin Am 17.01.2012 18:21, schrieb Jean-Sébastien Guay: Hello Martin, So now my rtt camera is the master camera and my ortho camera for the quad is a nested camera (see the

Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-01-17 Thread Michael Guerrero
Here's a breadcrumb trail for anyone wishing to go the NaCl route. It's a zip containing a detailed list of changes needed for osg 3.0.1, a custom GraphicsWindow derivative (GraphicsWindowNaCl), and a sample application that will render a triangle as shown above. If something is not clear or

Re: [osg-users] Place axes at corner

2012-01-17 Thread Clement.Chu
Thanks Robert. The example is not quite suitable on my case because my application is running on MFC window, but I still got some idea from the example to locate the axes on corner. I created a camera for axes geometry and then added as slave to view, but the axes cannot be rotated. Do you

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-17 Thread J.P. Delport
Hi, what format is the texture you are rendering to? If it is UNSIGNED CHAR then your data would be discretised. e.g. 45/255 = 0.176471 jp On 17/01/2012 21:11, wang shuiying wrote: Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image:

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-17 Thread Sebastian Messerschmidt
I suppose you are using a normal framebuffer. I this case it is pretty normal, that your original value that is in the image (you unfortunately didn't tell use if the value comes from a texture) doesn't exactly match the value in the framebuffer. Usually the framebuffer has 8bit per color

Re: [osg-users] Help:what is openGl shader version 140?

2012-01-17 Thread J.P. Delport
Hi, try without the version and just #extension GL_ARB_texture_rectangle : enable jp On 17/01/2012 20:15, wang shuiying wrote: Hello, my shader compile stage throws out such warnings: 0(8) : warning C7532: global type sampler2DRect requires #version 140 or later 0(8) : warning C: ... or

Re: [osg-users] Help:what is openGl shader version 140?

2012-01-17 Thread Sebastian Messerschmidt
Hello shuiying, either your card doesn't support glsl version 1.40 or you might have some other error in the shader. GLSL comes in different versions that are (AFAIK) defined by the GPU Architecture/Driver and Base OpenGL version. I had such warning sometimes if there was another problem in