mirror of https://github.com/axmolengine/axmol.git
Enable depth test in test case : TilemapTest->TMXOrthoVertexZ.
This commit is contained in:
parent
3ac08b7349
commit
440702aa06
|
@ -1172,12 +1172,14 @@ void TMXOrthoVertexZ::onEnter()
|
||||||
|
|
||||||
// TIP: 2d projection should be used
|
// TIP: 2d projection should be used
|
||||||
Director::getInstance()->setProjection(Director::Projection::_2D);
|
Director::getInstance()->setProjection(Director::Projection::_2D);
|
||||||
|
Director::getInstance()->setDepthTest(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMXOrthoVertexZ::onExit()
|
void TMXOrthoVertexZ::onExit()
|
||||||
{
|
{
|
||||||
// At exit use any other projection.
|
// At exit use any other projection.
|
||||||
Director::getInstance()->setProjection(Director::Projection::DEFAULT);
|
Director::getInstance()->setProjection(Director::Projection::DEFAULT);
|
||||||
|
Director::getInstance()->setDepthTest(false);
|
||||||
TileDemo::onExit();
|
TileDemo::onExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue