Hi Bram,

On 20 July 2014 00:35, Bram Vaessen <[email protected]> wrote:

> It seems the problem goes away when I remove this line:
>
>
> Code:
> rootNode->getOrCreateStateSet()->setTextureAttributeAndModes(4,
> noiseTexture.get() );
>
>
>
> noiseTexture is as the name suggest a noise texture (3d texture).
> I suppose I can move this texture up to the appropriate node instead of
> applaying it to the root node to solve my problem... but I'm still curious,
> why does the texture that i set at unit 4 mess up the fixed pipeline?


If you are using the OpenGL fixed function pipeline the driver will
automatically set up blending of the various textures for the texture units
that are active.  If you texture coordinates for a texture unit isn't
defined then the OpenGL result will be undefined as it could end up taking
the texcoord from anywhere.

You should set your scene graph up so that you only apply state that is
required to each subgraph.  The OSG supports sharing of StateAttribute and
StateSet's so you can efficiently apply state across the scene graph as
long as you share where appropriate.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to