fix depth clearing, ghostly modes not using depth layers, ortho with 0..1

This commit is contained in:
2024-10-14 16:00:27 +03:00
parent 19bf88d44e
commit f087bf1f7f
2 changed files with 5 additions and 2 deletions

View File

@ -159,7 +159,7 @@ void use_2d_pipeline(void) {
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, (double)ctx.base_render_width, (double)ctx.base_render_height, 0, -1, 1);
glOrtho(0, (double)ctx.base_render_width, (double)ctx.base_render_height, 0, 0, 1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@ -211,7 +211,7 @@ void use_texture_mode(TextureMode mode) {
glNewList(lists + 0, GL_COMPILE); {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthFunc(GL_ALWAYS);
glDepthFunc(GL_LESS);
glDepthMask(GL_FALSE);
glDisable(GL_ALPHA_TEST);
} glEndList();