Re: [osg-users] texture to file

2009-08-27 Thread Engvall Åsa
Try to use m_rImage-setInternalTextureFormat(GL_LUMINANCE32F_ARB); Åsa -Ursprungligt meddelande- Från: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] För J.P. Delport Skickat: den 27 augusti 2009 10:50 Till: OpenSceneGraph Users Ämne:

[osg-users] ComputeBoundsVisitor problem

2009-02-11 Thread Engvall Åsa
Hi osg-users! I want to use a ComputeBoundsVisitor for finding the bounds of an object. The object belongs to the class GroundObject, which is derived from osg::Node. Please have a look at this short function. The visitor is probably not executed, and the resulting bounding box is not valid.

Re: [osg-users] ComputeBoundsVisitor problem

2009-02-11 Thread Engvall Åsa
Engvall Åsa asa.engv...@saabgroup.com: Hi osg-users! I want to use a ComputeBoundsVisitor for finding the bounds of an object. The object belongs to the class GroundObject, which is derived from osg::Node. Please have a look at this short function. The visitor is probably not executed

[osg-users] Problem updating uniforms

2008-12-02 Thread Engvall Åsa
Hi osg-users! I have a shader attached to a subgraph. The shader uses a uniform which needs to be updated in every frame. The uniform is related to the modelviewmatrix, and should thus get a different value for every node in the subgraph. I have tried to use a osg::Uniform::Callback, but the

Re: [osg-users] Problem updating uniforms

2008-12-02 Thread Engvall Åsa
::PreciptionEffect as it caches the previous frames modelview matrix to enable it to compute motion blurr of the rain particles. This is done just for the precipitation effect drawables though. Robert. On Tue, Dec 2, 2008 at 2:08 PM, Engvall Åsa [EMAIL PROTECTED] wrote: I agree, but what I need

[osg-users] RTT - texture is not what I expected

2008-11-11 Thread Engvall Åsa
Recently, I tried to render the scene to a texture, and after some help I got something in the texture. Now, I've found that the texture doesn't show the scene but the previous frame. With shading and everything. How is that possible? My scene graph looks like this: root / \

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
, any reason why you have RGBA texture, but RGB in callback? jp Engvall Åsa wrote: Hi! I want to render the scene to a texture and use the texture in a shader. The texture image is saved to file by a postdraw callback, so I can look at it. I'm doing something wrong because the texture

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
:42 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi, is your RTT camera the child of anything? I'm just guessing without having an example to run. jp Engvall Åsa wrote: I thought that the texture must be in RGBA to be used in a shader. The callback was just

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
not under the viewer, try viewer.setSceneData(root); jp Engvall Åsa wrote: Hi again! Now I have changed my scenegraph according to your drawing, and put the RTT camera under a root node, but it still doesn't work. This time I attach all the code in my application, hope anybody has time

Re: [osg-users] Render to texture problem - resolved

2008-11-07 Thread Engvall Åsa
at 1:16 PM, Engvall Åsa [EMAIL PROTECTED] wrote: It isn't obvious to me why the RTT camera must be under the viewer. I just thought of the viewer as a camera which looks at the scene. Is the viewer more like something that collects the pictures from all cameras and make them visible

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
at the Root in Node1 instead and they will not be used when rendering with the RTTCamera. /Andreas 2008/11/7 Engvall Åsa [EMAIL PROTECTED] No, it isn't. Should it be? I tried to draw the scenegraph in my first message, but it's not easy just using text. If you want more code

[osg-users] Render to texture problem

2008-11-06 Thread Engvall Åsa
Hi! I want to render the scene to a texture and use the texture in a shader. The texture image is saved to file by a postdraw callback, so I can look at it. I'm doing something wrong because the texture becomes all gray. My scene graph looks like this: RTT camera root |

[osg-users] Varying shader variable /= 0 in vertex shader, is == 0 in fragment shader

2008-11-03 Thread Engvall Åsa
Hi osg-users! I'm trying to write my first shader, it is a very simple test program which sets the color on a sphere. The color depends on whether the sphere has moved relative to its position in the previous frame. I use two varying variables, which are set in the vertex shader, see the code

Re: [osg-users] Varying shader variable /= 0 in vertex shader... resolved

2008-11-03 Thread Engvall Åsa
/currentPosClip.w - previousPosClip.xy/previousPosClip.w; should be displacementNDC = currentPosClip.xy/currentPosClip.w - previousPosClip.xy/previousPosClip.w; Otherwise you will be declaring a new variable with the name displacementNDC the main function as scope. /Andreas 2008/11/3 Engvall

[osg-users] Problem to get textures from a .flt model

2008-06-17 Thread Engvall Åsa
Hi everybody! I am new to OSG and this is my first posting to OSG users. I have some problems to retrieve the textures from a .flt model and would like to know what I'm doing wrong. In main, the model is loaded in this way: osg::Group* Ground = dynamic_castosg::Group*

Re: [osg-users] Problem to get textures from a .flt model - resolved

2008-06-17 Thread Engvall Åsa
://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/OpenFlight Regards, Brede On Tue, Jun 17, 2008 at 8:24 AM, Engvall Åsa [EMAIL PROTECTED] wrote: Hi everybody! I am new to OSG and this is my first posting to OSG users. I have some problems to retrieve the textures from a .flt model