[osg-users] General Question about setAttribute and removeAttribute

2008-03-05 Thread Art Tevs
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

Re: [osg-users] General Question about setAttribute and removeAttribute

2008-03-05 Thread Robert Osfield
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 :

Re: [osg-users] General Question about setAttribute and removeAttribute

2008-03-05 Thread Art Tevs
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

Re: [osg-users] General Question about setAttribute and removeAttribute

2008-03-05 Thread Robert Osfield
On Wed, Mar 5, 2008 at 12:48 PM, Art Tevs [EMAIL PROTECTED] wrote: Hi Robert, yes this is one of the solutions, however I am wondering why this is not done automagically by the removeAttribute method? Because removeAttribute removes an attribute not any modes. However I also found