Am 2012-04-30 15:27, schrieb Thomas Geymayer: > I'm currently experimenting with a 2D Canvas and rendering everything to > a texture. For this I use FGODGauge to render to texture and > FGODGauge::set_texture to replace a texture in the cockpit with the > texture from the fbo. This works very well unless I enable any effect > which causes the texture to be replaced by the original one.
Never mind. It works now by using the same technique as for the SGMaterialAnimation where a group is placed in between the object whose texture should be changed and its parent. This group overrides the texture: stateSet->setTextureAttribute(0, _new_texture, osg::StateAttribute::OVERRIDE); stateSet->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::ON); If there exists a faster method which doesn't require the additional group, please tell me. Regards, Tom -- Thomas Geymayer www.tomprogs.at / C-Forum und Tutorial: www.proggen.org ------------------------------------------------------------------------ Student of Software Engineering & Business Administration -------------------- Graz University of Technology --------------------- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel