[osg-users] "Dis"applying of StateAttributes
Robert Osfield
robert.osfield at gmail.com
Tue Apr 15 03:21:56 PDT 2008
Hi Art,
If you want to remove a mode or attribute you simply one of use:
stateset->removeMode(..);
stateset->removeAttribute(..);
stateset->removeTextureAttribute(unit,..);
This will make the StateSet inherit from above.
As for the default set, OpenGL defaults are almost always used, but not
quite always. The GL_DEPTH_TEST is on by default in the OSG. Defaults for
the attributes can be found in the default constructed versions of those
attributes.
Robert.
On Tue, Apr 15, 2008 at 11:14 AM, Art Tevs <stud_info2 at yahoo.de> wrote:
> Hi folks,
>
> imagine I have a StateAttribute which do set the
> OpenGL's pipeline in some state. Now this attribute is
> applied for a node and the corresponding subgraph or
> only that node is rendered with this attribute.
>
> However there is no call to disapply this attribute. I
> mean how do I know which state the OpenGL's pipeline
> was before this attribute was applied to restore it.
>
> OK, as far as I see from different StateAttribute's
> derivatives (FBO, Viewport, Texture, ...) there is
> some default function call to set the GL's pipeline in
> a predictable state (i.e. bind FBO or texture with id
> 0, set default viewport, ...).
>
> However what if there is no real default state to
> which to return the GL's pipeline? How to manage this?
>
>
> __________________________________________________________
> Gesendet von Yahoo! Mail.
> Der Lieblings-Mailbox der Welt.
> http://de.overview.mail.yahoo.com
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080415/f5be3326/attachment.htm
More information about the osg-users
mailing list