polyadvent

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

commit af347d213fc2deb9f7de4c660f26ad043de3b881
parent 5444b48a0c2bced7eb200b56e274ad7de79fe000
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 26 Sep 2021 18:36:33 -0700

misc build fixes

Diffstat:
MMakefile | 8+++-----
Msrc/test_game.c | 7+++----
2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,13 +1,11 @@ NAME ?= polyadvent BIN ?= $(NAME) PREFIX ?= /usr/local -DEFS= -DGLFW_INCLUDE_NONE -DDEBUG +#DEFS= -DGLFW_INCLUDE_NONE -DDEBUG -O0 -g -U_FORTIFY_SOURCE # release build lol -# DEFS= -DGLFW_INCLUDE_NONE -DNDEBUG +DEFS= -DGLFW_INCLUDE_NONE -DNDEBUG -Og -g -# CFLAGS = $(DEFS) -ggdb -O0 -I src -Wall -Wextra -std=c99 \ - -CFLAGS = $(DEFS) -O1 -g -I src -Wall -Werror -Wextra -std=c99 \ +CFLAGS = $(DEFS) -Isrc -Wall -Werror -Wextra -std=c99 \ -Wno-unused-function \ -Wno-unused-parameter \ -Wno-unused-variable \ diff --git a/src/test_game.c b/src/test_game.c @@ -59,7 +59,7 @@ static void resize_fbos(struct entity *player, struct fbo *shadow_buffer, } // TODO: compute better bounds based - const float factor = 40.5; + const float factor = 60.5; struct model *model = get_model(&player->model_id); assert(model); struct geometry *geom = get_geometry(&model->geom_id); assert(geom); @@ -81,10 +81,9 @@ static void resize_fbos(struct entity *player, struct fbo *shadow_buffer, mat4_ortho(left, right, bottom, top, near, far, m4_ortho); create_fbo(shadow_buffer, width, height ); - /* fbo_attach_renderbuffer(&res->shadow_buffer, GL_DEPTH24_STENCIL8, */ - /* GL_DEPTH_STENCIL_ATTACHMENT); */ + //fbo_attach_renderbuffer(shadow_buffer, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL_ATTACHMENT); - /* fbo_attach_color_texture(&res->shadow_buffer); */ + //fbo_attach_color_texture(shadow_buffer); fbo_attach_depth_texture(shadow_buffer); check_fbo(shadow_buffer);