medfall

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

commit 6ca0fb3ca2d77c9221a0ebb6cdfd506d91c0a5bc
parent eb4c59c909e4beebd2e0bcff1eefe08178bdcff1
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Sep 10 18:04:19 -0700

Turn wireframe drawing on in btt.so

Diffstat:
mod_btt.cc | 21++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/mod_btt.cc b/mod_btt.cc @@ -201,7 +201,6 @@ extern "C" GAME_FRAME( game_frame ) { ); const glm::vec3 sun = glm::normalize( glm::vec3( 1, 0, -0.3 ) ); - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); glUseProgram( state->test_shader ); glUniformMatrix4fv( state->test_un_VP, 1, GL_FALSE, glm::value_ptr( VP ) ); glUniform1f( state->test_un_sun, state->test_sun ); @@ -209,16 +208,16 @@ extern "C" GAME_FRAME( game_frame ) { gpubtt_render( &state->gpubtt, state->test_un_normals ); glUseProgram( 0 ); - // immediate_init( &imm, triangles, array_count( triangles ) ); - // draw_btt( state->btt.left_root, &state->hm, &imm, glm::ivec2( 0, 0 ), glm::ivec2( 0, state->hm.height - 1 ), glm::ivec2( state->hm.width - 1, state->hm.height - 1 ) ); - // draw_btt( state->btt.right_root, &state->hm, &imm, glm::ivec2( state->hm.width - 1, state->hm.height - 1 ), glm::ivec2( state->hm.width - 1, 0 ), glm::ivec2( 0, 0 ) ); - // - // glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); - // - // glUseProgram( state->test_outline_shader ); - // glUniformMatrix4fv( state->test_outline_un_vp, 1, GL_FALSE, glm::value_ptr( VP ) ); - // immediate_render( &imm, state->test_outline_at_position, state->test_outline_at_colour ); - // glUseProgram( 0 ); + immediate_init( &imm, triangles, array_count( triangles ) ); + draw_btt( state->btt.left_root, &state->hm, &imm, glm::ivec2( 0, 0 ), glm::ivec2( 0, state->hm.height - 1 ), glm::ivec2( state->hm.width - 1, state->hm.height - 1 ) ); + draw_btt( state->btt.right_root, &state->hm, &imm, glm::ivec2( state->hm.width - 1, state->hm.height - 1 ), glm::ivec2( state->hm.width - 1, 0 ), glm::ivec2( 0, 0 ) ); + + glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); + glUseProgram( state->test_outline_shader ); + glUniformMatrix4fv( state->test_outline_un_vp, 1, GL_FALSE, glm::value_ptr( VP ) ); + immediate_render( &imm, state->test_outline_at_position, state->test_outline_at_colour ); + glUseProgram( 0 ); + glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); skybox_render( &state->skybox, state->angles );