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:
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.
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
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
::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
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
/ \
,
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
: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
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
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
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
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
|
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
/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
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*
://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
16 matches
Mail list logo