Code: Select all
IAnimatedMeshSceneNode* meshOneModel = sceneManager->addAnimatedMeshSceneNode(mesh);
meshOneModel->setMaterialFlag(EMF_LIGHTING, true);
meshOneModel->addShadowVolumeSceneNode();
meshOneModel->setMaterialFlag(EMF_NORMALIZE_NORMALS, true);
Code: Select all
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilFunc(GL_NEVER, 0x1, 0x1);
glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
videoDriver->draw2DRectangle( video::SColor(255,255,255,255), core::rect<s32>(0,0,200,200) );
PS: I know that the stencil buffer is at least 8 bits, so is it possible for me to use part of it to mask the rendering zone, while not affecting the stencil shadows?