medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5eac3ccbc9466913ead8800a25891c48d14424e3
parent d2dfca98b7ae276484a1ee03848e927421aefac2
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Nov 27 13:21:40 +0200

Put the skybox back on the BTT viewer

Diffstat:
mod_btt.cc | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/mod_btt.cc b/mod_btt.cc @@ -3,7 +3,7 @@ #include "game.h" #include "intrinsics.h" #include "immediate.h" -// #include "skybox.h" +#include "skybox.h" #include "stb_image.h" #include "linear_algebra.h" #include "lz4.h" @@ -191,9 +191,7 @@ extern "C" GAME_INIT( game_init ) { const OffsetHeightmap ohm = { game->hm, 0, 0 }; gpubtt_init( &mem->persistent_arena, &game->gpubtt, game->btt, &ohm, normals, horizons ); - glClearColor( 0, 0.5, 0.7, 1 ); - - // skybox_init( &game->skybox ); + skybox_init( &game->skybox ); } static m4 camera_to_vp( v3 position, v3 angles ) { @@ -226,7 +224,8 @@ static void draw_qt( ImmediateContext * imm, AABBu32 aabb, const array< Heightma } extern "C" GAME_FRAME( game_frame ) { - renderer_begin_frame(); + renderer_begin_frame( CLEARCOLOUR_DONT ); + skybox_render( &game->skybox, game->angles, game->test_sun ); const int fb = input->keys[ 'w' ] - input->keys[ 's' ]; const int lr = input->keys[ 'a' ] - input->keys[ 'd' ]; @@ -303,7 +302,5 @@ extern "C" GAME_FRAME( game_frame ) { // glUseProgram( 0 ); // glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); - // skybox_render( &game->skybox, game->angles ); - // benchmark_print_timers(); }