I've found the problem, Javier's code is correct. I was missing this command: Code: osg::DisplaySettings::instance()->setMinimumNumStencilBits(1); Maybe it helps someone ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66881#66881