Hi, all!
I need to produce various debug geometry using ManualObject. For that I need vertex-color only material generated in C++,
which should be seen on top of everything ignoring depth and render ordering. How can I do this? Or maybe there is existing embedded one?
My last attempt is not quite adequate...
Code: Select all
Ogre::MaterialPtr
createVertexColorNoDepthMaterial(const std::string &materialName)
{
Ogre::MaterialPtr material =
Ogre::MaterialManager::getSingleton().create(
materialName,
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
Ogre::Pass *pass = material->getTechnique(0)->getPass(0);
pass->setLightingEnabled(false);
pass->setCullingMode(Ogre::CULL_NONE);
pass->setVertexColourTracking(Ogre::TVC_DIFFUSE | Ogre::TVC_AMBIENT |
Ogre::TVC_SPECULAR);
// pass->setDepthCheckEnabled(true);
pass->setDepthCheckEnabled(false);
// pass->setDepthWriteEnabled(false);
pass->setDepthWriteEnabled(false);
material->load();
return material;
}
The problem it is both occluded by everything and still affected by other objects ![]()
The color works but it is not the color I thought it would be... would be nice to make it finally work...
@paroj sorry to bother but I struggle with this one for a long time ![]()

