medfall

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

commit ef11daf3fb6c8132c3905286784c06f1645aca5c
parent e477202e98ed097509a65a7bcbc4127cb8a7b8b8
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Aug 25 21:42:03 +0200

Use GLint for attributes in BSP renderer

Diffstat:
bsp_renderer.cc | 4++--
bsp_renderer.h | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bsp_renderer.cc b/bsp_renderer.cc @@ -132,7 +132,7 @@ void bspr_init( BSPRenderer * const bspr, MemoryArena * const arena, const BSP * } -static void bspr_render_leaf( const BSPRenderer * const bspr, const u32 leaf, const GLuint at_position, const GLuint at_colour ) { +static void bspr_render_leaf( const BSPRenderer * const bspr, const u32 leaf, const GLint at_position, const GLint at_colour ) { glBindVertexArray( bspr->vaos[ leaf ] ); glBindBuffer( GL_ARRAY_BUFFER, bspr->vbos[ leaf * 2 ] ); @@ -151,7 +151,7 @@ static void bspr_render_leaf( const BSPRenderer * const bspr, const u32 leaf, co static const glm::mat4 P( glm::perspective( glm::radians( 120.0f ), 640.0f / 480.0f, 0.1f, 10000.0f ) ); -void bspr_render( const BSPRenderer * const bspr, const glm::vec3 & pos, const GLuint at_position, const GLuint at_colour ) { +void bspr_render( const BSPRenderer * const bspr, const glm::vec3 & pos, const GLint at_position, const GLint at_colour ) { const s32 cluster = bspr->bsp->position_to_leaf( pos ).cluster; if( cluster == -1 ) { diff --git a/bsp_renderer.h b/bsp_renderer.h @@ -17,7 +17,7 @@ struct BSPRenderer { }; void bspr_init( BSPRenderer * const bspr, MemoryArena * const arena, const BSP * const bsp ); -void bspr_render( const BSPRenderer * const bspr, const glm::vec3 & pos, const GLuint at_position, const GLuint at_colour ); +void bspr_render( const BSPRenderer * const bspr, const glm::vec3 & pos, const GLint at_position, const GLint at_colour ); void bspr_destroy( BSPRenderer * const bspr ); #endif // _BSP_RENDERER_H_