polyadvent

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

commit ad85b8fa49b8688e8b4f23ef16176b483e16d671
parent 5d8a70c618224e7a09869bcfff3da465e791987b
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  3 Nov 2018 23:05:08 -0700

make sure to cull

Diffstat:
Msrc/render.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/render.c b/src/render.c @@ -240,8 +240,6 @@ void render (struct game *game, struct render_config *config) { static float view_proj[MAT4_ELEMS] = { 0 }; static float normal_matrix[MAT4_ELEMS] = { 0 }; static float model_view[MAT4_ELEMS] = { 0 }; - static float depth_bias[MAT4_ELEMS] = { 0 }; - static float tmp[MAT4_ELEMS] = { 0 }; mat4_id(id); mat4_id(model_view); @@ -279,11 +277,11 @@ void render (struct game *game, struct render_config *config) { if (config->is_depth_pass) { mat4_multiply(bias_matrix, view_proj, config->depth_mvp); - /* glCullFace(GL_FRONT); */ + glCullFace(GL_FRONT); } else { glUniformMatrix4fv(res->uniforms.depth_mvp, 1, 0, config->depth_mvp); - /* glCullFace(GL_BACK); */ + glCullFace(GL_BACK); } check_gl();