commit 1bfe9b5da3363badcec98597292260e5e0191317 parent 1fb844e16980e2bad9e31062421ed2c20eb25a2b Author: Michael Savage <mikejsavage@gmail.com> Date: Fri Sep 2 15:49:43 -0700 Add a skybox to the terrain module Diffstat:
game.h | | | 2 | +- |
hm.cc | | | 4 | ++++ |
diff --git a/game.h b/game.h @@ -137,7 +137,7 @@ struct GameState { GLint test_outline_at_colour; GLint test_outline_un_vp; - Skybox test_skybox; + Skybox skybox; float test_sun; diff --git a/hm.cc b/hm.cc @@ -205,6 +205,8 @@ extern "C" GAME_INIT( game_init ) { state->font_at_colour = glGetAttribLocation( state->font_shader, "colour" ); state->font_at_uv = glGetAttribLocation( state->font_shader, "uv" ); state->font_un_atlas = glGetUniformLocation( state->font_shader, "atlas" ); + + skybox_init( &state->skybox ); } static void draw_string( const GameState * state, @@ -335,4 +337,6 @@ extern "C" GAME_FRAME( game_frame ) { glUseProgram( 0 ); glDisable( GL_BLEND ); glEnable( GL_DEPTH_TEST ); + + skybox_render( &state->skybox, state->angles ); }