Operating System: Windows 10
Render System: OpenGL
Hello,
I'm asking here because of a strange behavior in depth write.
In my engine I use the depth only write on materials to simulate old 2.5D adventures, such alone in the dark trilogy, resident evil etc...
So, I use an entity with depth write only material, and I draw a background with the scene rendering.
I created this helper method:
Code: Select all
inline static void SetWriteDepthOnly(Ogre::Entity* entity)
{
auto material = entity->getSubEntity(0)->getMaterial();
material->getTechnique(0)->getPass(0)->setColourWriteEnabled(false);
material->getTechnique(0)->getPass(0)->setDepthWriteEnabled(true);
}
Could it be that I forgot something? Maybe there's a more stable and better solution for managing this?
Thanks a lot