Hi Hartwig, Eye linear TexGen is positional state, that in OpenGL requires you to apply a specific modelview matrix prior to doing the glTexGen - it's the TexGenNode's role to provide the way of telling the OSG's rendering backend which modelview matrix to bind to the osg::TexGen (and associated glTextGen call). Once the texgen plans are correctly positioned then in OpenGL you then toggle on/off the actual texgen operations on the GPU via enabling/disabling the associated GL_TEX_GENi modes and this is done in the OSG via StateSet::setMode(GL_TEXTURE_GEN_S/T/R/Q,..) calls.
Robert. On Mon, Apr 19, 2010 at 8:35 PM, Hartwig Wiesmann <hartwig.wiesm...@wanadoo.nl> wrote: > Hi, > > in the osgtexture1d example the node construction is done like this: > > root->addChild(loadedModel); // having attached a stateset using a 1d texture > root->addChild(texGenNode); > > Why is this working? > > I would expect an order like: > > root->addChild(texGenNode); > texGenNode->addChild(loadedModel); > > > Thank you! > > Cheers, > Hartwig > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=26963#26963 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org