in a project I want to render a lot of shapes with different colors. I created the color of the shape with a QGLMaterial and add the shape to the QGLBuilder with this commands:
//Build SceneNode
m_lpBuilder->newSection();
...
m_lpBuilder->currentNode()->setMaterialIndex(idxMaterial); //idx in range of 0 to 1000
m_lpBuilder->currentNode()->setEffect(QGL::LitMaterial);
when I only have a few colors (QGLMaterial
) the scene is rendered very fast but with a large kind of colors it is very slow.
is there a way to improve this?