disable depth wirte for blended, less or equal depth func for seethrough
This commit is contained in:
parent
3edd692771
commit
8a0f767002
@ -159,11 +159,11 @@ static void render_sprites(const struct primitive_2d primitives[],
|
|||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glDepthFunc(GL_ALWAYS);
|
glDepthFunc(GL_ALWAYS);
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_FALSE);
|
||||||
glDisable(GL_ALPHA_TEST);
|
glDisable(GL_ALPHA_TEST);
|
||||||
} else if (batch.mode == TEXTURE_MODE_SEETHROUGH) {
|
} else if (batch.mode == TEXTURE_MODE_SEETHROUGH) {
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
glDepthFunc(GL_ALWAYS);
|
glDepthFunc(GL_LEQUAL);
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
glEnable(GL_ALPHA_TEST);
|
glEnable(GL_ALPHA_TEST);
|
||||||
glAlphaFunc(GL_EQUAL, 1.0f);
|
glAlphaFunc(GL_EQUAL, 1.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user