[osg-users] Strange setImage behaviour

David Spilling david.spilling at gmail.com
Tue Mar 10 13:00:46 PDT 2009


Okay, so something like this should work, I guess.

void updateTexture( IplImage *img, ref_ptr<Node> geode)
{
       ref_ptr<StateSet> state = geode->getOrCreateStateSet();
       ref_ptr<Texture2D> Tex = (Texture2D*)
state->getTextureAttribute(0,StateAttribute::TEXTURE);
       Tex->setImage(img);
       return;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090310/418f4696/attachment-0003.htm>


More information about the osg-users mailing list