Skip to content

Commit 553acfb

Browse files
committed
fix visual error for outline
1 parent 659fbd6 commit 553acfb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,9 @@ void Effect3DOutline::drawWithSprite(EffectSprite3D* sprite, const Mat4 &transfo
356356
}
357357
//draw
358358
{
359+
glEnable(GL_CULL_FACE);
359360
glCullFace(GL_FRONT);
360-
361+
glEnable(GL_DEPTH_TEST);
361362
Color4F color(sprite->getDisplayedColor());
362363
color.a = sprite->getDisplayedOpacity() / 255.0f;
363364

@@ -368,8 +369,9 @@ void Effect3DOutline::drawWithSprite(EffectSprite3D* sprite, const Mat4 &transfo
368369
_glProgramState->apply(transform);
369370
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh->getIndexBuffer());
370371
glDrawElements(mesh->getPrimitiveType(), mesh->getIndexCount(), mesh->getIndexFormat(), 0);
371-
372+
glDisable(GL_DEPTH_TEST);
372373
glCullFace(GL_BACK);
374+
glDisable(GL_CULL_FACE);
373375
}
374376
}
375377

0 commit comments

Comments
 (0)