Hi,
I have a scene setup with a texture attached to a camera which is setup
for pre-rendering.
In my scene I set the viewport for the RTT camera to the dimensions of
the texture. Despite having done this, the viewport for the RTT camera
is being inherited from the main scenes camera, i.e. if the viewport of
the main camera is (0,0,8000,600) then only this section of the texture
is rendered, despite the viewport for the rtt camera being
(0,0,1024,1024).
I have stepped through the CullVistor with a debugger and have found
that the viewport does seem to be setup correctly by the cull visitor.
By the time I get to this section of the CullVisitor:
switch(camera.getRenderOrder())
{
case osg::Camera::PRE_RENDER:
//In the following line the viewport for the camera and the rtts is
correct
getCurrentRenderBin()->getStage()->addPreRenderStage(rtts.get(),camera.g
etRenderOrderNum());
break;
default:
getCurrentRenderBin()->getStage()->addPostRenderStage(rtts.get(),camera.
getRenderOrderNum());
break;
}
the viewport seems to have been setup correctly. Both the rtts's
viewport and the cameras viewport is (0,0,1024,1024), but when it is
rendered this is not the viewport that is used.
I am not quite sure where to go from here. Does anyone have any
suggestions on what I may have done wrong or what area I should debug
next?
I am using version 2.9.5 of OSG.
Cheers,
Brad
DISCLAIMER:---------------------------------------------------------------------------
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or
copyright
material or information that is subject to legal professional privilege. They
are for
the use of the intended recipient only. Any unauthorised viewing, use,
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without
the
written permission of the owner. If you have received this transmission in
error, or
are not an authorised recipient, please immediately notify the sender by return
email,
delete this message and all copies from your e-mail system, and destroy any
printed
copies. Receipt by anyone other than the intended recipient should not be
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or
represent
that this e-mail or any documents, files and previous e-mail messages attached
are
error or virus free.
--------------------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org