polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit e7b851cb2fd942564d57c2036cff2f404f723460
parent eb14d3882d3db43f762989e0f8225415b4cdda1c
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 13 Nov 2018 19:23:24 -0800

quick skybox cleanup

Diffstat:
Msrc/render.c | 2--
Msrc/skybox.c | 2++
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/render.c b/src/render.c @@ -355,9 +355,7 @@ void render (struct game *game, struct render_config *config) { mat4_remove_translations(view); mat4_multiply(projection, view, view_proj); - glDepthFunc(GL_LEQUAL); render_skybox(&res->skybox, view_proj); - glDepthFunc(GL_LESS); } if (config->draw_ui) diff --git a/src/skybox.c b/src/skybox.c @@ -96,6 +96,7 @@ void create_skybox(struct skybox *skybox, struct gpu_program *program) { void render_skybox(struct skybox *skybox, mat4 *camera) { + glDepthFunc(GL_LEQUAL); glDepthMask(GL_FALSE); check_gl(); @@ -113,4 +114,5 @@ void render_skybox(struct skybox *skybox, mat4 *camera) { glDepthMask(GL_TRUE); check_gl(); + glDepthFunc(GL_LESS); }