Okay, so something like this should work, I guess.<br><br>void updateTexture( IplImage *img, ref_ptr<Node> geode)<br>
{<br>
        ref_ptr<StateSet> state = geode->getOrCreateStateSet();<br>
        ref_ptr<Texture2D> Tex = (Texture2D*) state->getTextureAttribute(0,StateAttribute::TEXTURE);<br>
 <div>       Tex->setImage(img);<br>       return;<br>
}</div><br>