Having never used a ColorMatrix in OpenGL or OSG What effect is this supposed to produce ?
Do you have screen grabs of what it should look like if done in raw Opengl ? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rahul Jain Sent: Monday, July 28, 2008 10:40 AM To: 'OpenSceneGraph Users' Subject: [osg-users] Problem using osg::ColorMatrix Hi all, I am trying to use OpenFL color matrix functionality through osg::ColorMatrix but not able to do so. When i apply this to a node |(cessna.osg) i do not see any effect. I am pasting the code below for you guys to have a look. I don't know what am i doing wrong in this simple piece of code . cheers RJ int main(int argc, char** argv) { osg::MatrixTransform* cessnaMT = new osg::MatrixTransform; osg::Node* cessna = osgDB::readNodeFile("cessna.osg"); cessnaMT->addChild(cessna); // Set color matrix osg::ColorMatrix* colorMatrix = new osg::ColorMatrix; const osg::Matrix cm (0.15, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0, 0.0, 0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0); colorMatrix->setMatrix(cm); cessnaMT->getOrCreateStateSet()->setAttributeAndModes(colorMatrix, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON); osgViewer::Viewer viewer; // add model to viewer. viewer.setSceneData(cessnaMT); viewer.run(); return 0; } _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

