Perhaps this is desired behavior, but even if you set a new material with colormask ECP_ALL before the call to beginScene() the new material is not used for that. It's only applied when something is actually rendered.
Code: Select all
while(dev->run()) {
drv->beginScene(); //only clears alpha channel
...
SMaterial mat;
mat.ColorMask = ECP_ALPHA;
drv->setMaterial(mat);
renderSomething();
mat.ColorMask = ECP_ALL; //this colormask isn't used for beginScene
drv->setMaterial(mat);
drv->endScene();
}