Hello,
I have a question with respect to SimpleMaterial. Look at the following code: NodeRefPtr scene = Node::create(); GeometryRefPtr cylgeo = makeCylinderGeo( 1.4f, .3f, 8, true, true, true ); scene->setCore(cylgeo); mgr = SimpleSceneManager::create(); NodeRefPtr node = Node::create(); MaterialChunkOverrideGroupRefPtr group = MaterialChunkOverrideGroup::create(); node->setCore(group); //ChunkMaterialRefPtr mat = ChunkMaterial::create(); //MaterialChunkRefPtr chunk = MaterialChunk::create(); //chunk->setDiffuse(Color4f(1.0f, 0.0f, 0.0f, 1.0f)); //mat->addChunk(chunk); SimpleMaterialRefPtr mat = SimpleMaterial::create(); mat->setDiffuse(Color3f(1.0f, 0.0f, 0.0f)); group->setMaterial(mat); node->addChild(scene); // tell the manager what to manage mgr->setWindow(gwin ); mgr->setRoot (node); This does not work, i.e. the cylinder is not diffusely red. If I change the code to use the ChunkMaterial it is working fine. But the SimpleMaterial is kind of a ChunkMaterial. So my expectation is that the above code should seamlessly work. Do I expect too much here? What do you think? Best, Johannes ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
