commit daadb73a124bbe701384f36e4703853f09ced95c parent 3218038fa9c24180ecddab045f1b214036b5bb03 Author: Michael Savage <mikejsavage@gmail.com> Date: Tue Nov 8 20:07:37 +0200 Move glm nuking Diffstat:
terrain_manager.cc | | | 10 | +++++----- |
terrain_manager.h | | | 2 | +- |
diff --git a/terrain_manager.cc b/terrain_manager.cc @@ -375,16 +375,16 @@ void terrain_update( TerrainManager * tm, glm::vec3 position ) { } struct VSData { - glm::mat4 v; - glm::mat4 vp; + m4 v; + m4 vp; }; struct FSData { - glm::vec2 dimensions; + v2 dimensions; float sun; }; -void terrain_render( TerrainManager * tm, glm::mat4 V, glm::mat4 VP, float sun, double current_time ) { +void terrain_render( TerrainManager * tm, m4 V, m4 VP, float sun, double current_time ) { u32 inited = 0; for( u16 vy = 0; vy < VIEW_SIZE; vy++ ) { for( u16 vx = 0; vx < VIEW_SIZE; vx++ ) { @@ -417,7 +417,7 @@ void terrain_render( TerrainManager * tm, glm::mat4 V, glm::mat4 VP, float sun, } VSData vsdata = { V, VP }; - FSData fsdata = { glm::vec2( TILE_SIZE, TILE_SIZE ), sun }; + FSData fsdata = { v2( TILE_SIZE, TILE_SIZE ), sun }; renderer_ub_data( tm->vertex_uniforms, &vsdata, sizeof( vsdata ) ); renderer_ub_data( tm->fragment_uniforms, &fsdata, sizeof( fsdata ) ); diff --git a/terrain_manager.h b/terrain_manager.h @@ -81,7 +81,7 @@ struct TerrainManager { void terrain_init( TerrainManager * tm, const char * tiles_dir, MemoryArena * arena, WorkQueue * background_tasks ); void terrain_teleport( TerrainManager * tm, glm::vec3 position ); void terrain_update( TerrainManager * tm, glm::vec3 position ); -void terrain_render( TerrainManager * tm, glm::mat4 V, glm::mat4 VP, float sun, double current_time ); +void terrain_render( TerrainManager * tm, m4 V, m4 VP, float sun, double current_time ); float terrain_height( const TerrainManager * tm, glm::vec3 position ); #endif // _TERRAIN_MANAGER_H_