Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
(osgViewer::Viewer::SingleThreaded); Unfortunately, the texture is still gray. Åsa -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För J.P. Delport Skickat: den 7 november 2008 08:22 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi

Re: [osg-users] Render to texture problem

2008-11-07 Thread J.P. Delport
] För J.P. Delport Skickat: den 7 november 2008 08:22 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi, 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

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 Andreas Lindmark
PROTECTED] För J.P. Delport Skickat: den 7 november 2008 09: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

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
? Trying to learn more... Åsa -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För J.P. Delport Skickat: den 7 november 2008 13:47 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem I just read quickly, but it seems your camera is still

Re: [osg-users] Render to texture problem

2008-11-07 Thread Robert Osfield
Hi Asa, On Fri, Nov 7, 2008 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

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

2008-11-07 Thread Engvall Åsa
OK, that sounds logical. Thank you, bye for now! Åsa -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Robert Osfield Skickat: den 7 november 2008 14:22 Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem Hi Asa, On Fri, Nov 7, 2008

Re: [osg-users] Render to texture problem

2008-11-07 Thread Andreas Lindmark
:* OpenSceneGraph Users *Ämne:* Re: [osg-users] Render to texture problem The camera has to be somewhere in the scenegraph under the root. Something like this: Root /\ RTTCamera Node1 \/ World Set the uniforms that you currently set

Re: [osg-users] Render to texture problem

2008-11-07 Thread J.P. Delport
(); } *Från:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *För *Andreas Lindmark *Skickat:* den 7 november 2008 10:33 *Till:* OpenSceneGraph Users *Ämne:* Re: [osg-users] Render to texture problem The camera has to be somewhere

Re: [osg-users] Render to texture problem

2008-11-07 Thread Engvall Åsa
Till: OpenSceneGraph Users Ämne: Re: [osg-users] Render to texture problem The camera has to be somewhere in the scenegraph under the root. Something like this: Root /\ RTTCamera Node1 \/ World Set the uniforms that you currently set

[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 |

Re: [osg-users] Render to texture problem

2008-11-06 Thread Csaba Halász
On Thu, Nov 6, 2008 at 5:16 PM, Engvall Åsa [EMAIL PROTECTED] wrote: 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. I have

Re: [osg-users] Render to texture problem

2008-11-06 Thread J.P. Delport
Hi, can you force single threaded osgviewer and see if it still is a problem? 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

Re: [osg-users] Render to texture problem

2008-11-06 Thread J.P. Delport
Hi, 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

[osg-users] Render To Texture problem in a Reflection algorithm

2007-12-02 Thread zhangguilian
Hi, In an algorithm of reflection I used Render To Texture, part of the code is: Texture2D* reflectionTex=new Texture2D;//rtt texture reflectionTex-setTextureSize(512, 512); reflectionTex-setInternalFormat(GL_RGBA);

Re: [osg-users] Render To Texture problem in a Reflection algorithm

2007-12-02 Thread Himar Carmona
Hi, do both graphics cards support Frame_Buffer_object ? The problem could be in the renderfallback (i.e. PIXEL_BUFFER_RTT) if they do not support it? Try the different RTT methods if these seems to be the problem. Also , i think you maust set the viewport for FBO to work (i suppose it is set