[osg-users] Uniforms and state sorting
Mike Weiblen
mweiblen at zebraimaging.com
Tue Apr 1 09:01:40 PDT 2008
Hi Nathan,
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-
> bounces at lists.openscenegraph.org] On Behalf Of Monteleone, Nathan
> Sent: Tuesday, April 01, 2008 10:04 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] Uniforms and state sorting
...
> I'd think the uniform state would be independent of the GL_TEXTURE_2D
> mode. In fact the whole reason I have that Texture2DEnabled uniform
is
> so that my shader can tell whether or not there's any texture. AFAIK
> you can't examine the fixed pipe enable states from GLSL. Someone
> please clue me in if the
> way I'm doing this is idiotic.
>
> -Nathan
You are correct: glEnable state is completely separate from GLSL
shaders, and that Boolean enable state is not
exposed as GLSL builtin uniform; you must provide your own uniform to
communicate the enable if you so wish.
cheers
-- mew
More information about the osg-users
mailing list