Skip to content

Commit

Permalink
enable depth write
Browse files Browse the repository at this point in the history
  • Loading branch information
super626 committed Aug 28, 2015
1 parent 4fe9517 commit 6fa6f1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cocos/2d/CCCameraBackgroundBrush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ void CameraBackgroundSkyBoxBrush::drawBackground(Camera* camera)
glEnable(GL_DEPTH_TEST);
RenderState::StateBlock::_defaultState->setDepthTest(true);

glDepthMask(GL_TRUE);
RenderState::StateBlock::_defaultState->setDepthWrite(true);

glDepthFunc(GL_ALWAYS);
RenderState::StateBlock::_defaultState->setDepthFunction(RenderState::DEPTH_ALWAYS);

Expand Down

0 comments on commit 6fa6f1f

Please sign in to comment.