Hi Julien,

The StateSet::set*AttributeAndModes(...) and there for convenience, so
one doesn't have to remember which GL modes are associated with the
attribute being set and to ensure that one line of code is enough to
set things correctly rather then multiple lines.

However, in modern OpenGL where you use uniforms and shaders far more
than old fixed function style StateAttribute the GL modes part takes a
back seat and is something that will be used far less.

Robert.

On 26 May 2016 at 23:28, Julien Valentin <[email protected]> wrote:
> Hi,
> I had a bug using setTextureAttributeAndModes with a TextureBuffer and 
> realized there are two methods (i used the setTextureAttribute and now all is 
> good)
>
> Code:
>  /** Set this StateSet to contain specified attribute and override flag.*/
>         void setTextureAttribute(unsigned int unit,StateAttribute *attribute, 
> StateAttribute::OverrideValue value=StateAttribute::OFF);
>         /** Set this StateSet to contain specified attribute and set the 
> associated GLMode's to specified value.*/
>         void setTextureAttributeAndModes(unsigned int unit,StateAttribute 
> *attribute, StateAttribute::GLModeValue value=StateAttribute::ON);
>
>
>
>
> Can you explain me what are the purpose of both of them?
> Is setTextureAttributeAndModes only there for retrocompatibility?
> Thanks in advance
>
>
> Thank you!
>
> Cheers,
> Julien
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67245#67245
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to