That did the trick, thanks,

 

-Rodolfo

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glenn
Waldron
Sent: Thursday, October 16, 2008 12:09 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Viewer with 2 overlay nodes

 

Rodolfo,

You probably need to set a different texture unit for each overlay; see
OverlayNode::setOverlayTextureUnit(2) for the second overlay node. Just
a guess.. -gw

On Thu, Oct 16, 2008 at 1:48 PM, Ortiz, Rodolfo <[EMAIL PROTECTED]>
wrote:

Hello,

 

This may be a silly question, but is it possible to have more than one
OverlayNode in a scene? I ran a quick test using osganimate.cpp and I
get strange results (see JPEG). I would expect to see two planes, each
one projected to a different base. Instead, I get two planes, but with
one plane projected to both bases (and no projection for the other one).
By having 2 overlayNodes in my application, I can have the ability to
"highlight" one node but not the other. 

 

My main changes to osganimate are:

 

        osgSim::OverlayNode* overlayNode = new
osgSim::OverlayNode(technique);

        overlayNode->setContinuousUpdate(true);

        overlayNode->setOverlaySubgraph(movingModel);

        overlayNode->setOverlayBaseHeight(baseHeight-0.01);

        overlayNode->addChild(baseModel);

        root->addChild(overlayNode);

            

        osgSim::OverlayNode* overlayNode2 = new
osgSim::OverlayNode(technique);

        overlayNode2->setContinuousUpdate(true);

        overlayNode2->setOverlaySubgraph(movingModel2);

        overlayNode2->setOverlayBaseHeight(baseHeight-0.01);

        overlayNode2->addChild(baseModel2);

        root->addChild(overlayNode2);

Am I missing something in the code? I am using osg2.6.0 with WindowsXP
SP3, thanks,

-Rodolfo

 

This e-mail, including any attachments, contains information intended
only for
the use of the individual or entity to which it is addressed and may
contain
information that is privileged and/or confidential or is otherwise
protected by
law. If you are not the intended recipient or agent or an employee
responsible
for delivering the communication to the intended recipient, you are
hereby
notified that any review, use, disclosure, copying and/or distribution
of its
contents is prohibited. If you have received this e-mail in error,
please
notify us immediately by reply to sender only and destroy the original.


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g




-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791




This e-mail, including any attachments, contains information intended only for
the use of the individual or entity to which it is addressed and may contain
information that is privileged and/or confidential or is otherwise protected by
law. If you are not the intended recipient or agent or an employee responsible
for delivering the communication to the intended recipient, you are hereby
notified that any review, use, disclosure, copying and/or distribution of its
contents is prohibited. If you have received this e-mail in error, please
notify us immediately by reply to sender only and destroy the original.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to