Hi Robert, yes this is one of the solutions, however I am wondering why this is not done automagically by the removeAttribute method?
However I also found what I have also looked for. If I just add an empty texture to the stateset (stateset->setTextureAttribute(X, new osg::Texture2D()); this will just bind the texture with id 0 to the unit, which is per default always returns 0. Thank you. cheers, Art --- Robert Osfield <[EMAIL PROTECTED]> schrieb: > HI Art, > > OpenGL doesn't have a concept of unbinding > attributes, and neither > does the OSG. OpenGL has the concept of enabling > and disabling via > mode, and the OSG maps this via > StateSet::setMode(..) and > setTexureMode(uint unit,...); My guess is that you > are looking for : > > statest->setTextureMode(1, GL_TEXTURE_2D, > osg::StateAttribute::OFF); > > Which effectively disables the second texture unit. > > Robert. > > On Wed, Mar 5, 2008 at 12:25 PM, Art Tevs > <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > just some thoughts about texture attributes (or > all > > other attributes in general): > > > > If we first setup a texture attribute on a > StateSet, > > lets say for the texture unit 0. > > After some time we remove this attribute and > assign it > > to texture unit 1. > > > > This would end up in the texture bounded to > texture > > unit 0 and 1, since there is no explicit call > like : > > glActiveTexture(GL_TEXTURE0) + glBindTexture(.., > 0) to > > unbind the texture from the unit 0. > > > > > > Shouldn't there be a method like, unbound texture > unit > > x ? > > Currently I do this always manually if I need it, > > however this can not be the solution ;-) > > > > > > Best regards, > > Art > > > > > > > > > > __________________________________ Ihre > erste Baustelle? Wissenswertes für Bastler und Hobby > Handwerker. www.yahoo.de/clever > > _______________________________________________ > > 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 > Lesen Sie Ihre E-Mails auf dem Handy. www.yahoo.de/go _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org