Skip to content

Commit b106b2f

Browse files
committed
Merge pull request #175 from lvlonggame/v3
fix bug: same model in mirror state cullFace problem.
2 parents a59d4ab + d0ce994 commit b106b2f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cocos/renderer/CCMeshCommand.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ void MeshCommand::applyRenderState()
164164
if (_cullFaceEnabled && !s_cullFaceEnabled)
165165
{
166166
glEnable(GL_CULL_FACE);
167-
if (s_cullFace != _cullFace)
168-
{
169-
glCullFace(_cullFace);
170-
s_cullFace = _cullFace;
171-
}
172167
s_cullFaceEnabled = true;
173168
}
169+
if (s_cullFace != _cullFace)
170+
{
171+
glCullFace(_cullFace);
172+
s_cullFace = _cullFace;
173+
}
174174
if (_depthTestEnabled && !s_depthTestEnabled)
175175
{
176176
glEnable(GL_DEPTH_TEST);

0 commit comments

Comments
 (0)