In my code I'm creating some geometry and assigning a texture with...
txState->setTextureAttributeAndModes(0, texture1, ON);
geode->setStateSet( txState1 );
I create a hotkey which changes the texure with...
txState->setTextureAttributeAndModes(0, texture2, ON);
This works fine but when I try to toggle back to the original texture with
txState->setTextureAttributeAndModes(0, texture1, ON);
The program crashes. I've tried to implement this a couple different ways
(assigning a new state object, etc. but I always get a crash when I switch
back to the first texture. What is the proper way to do this?
Thanks.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/