medfall

A super great game engine
Log | Files | Refs

commit 3882ec004b1dea878c001fad07c5e2b5e71d2764
parent 48163b416a69999d5cc0aad330956eb83b7ab50f
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Jul 16 14:44:15 +0300

MSVC warnings

Diffstat:
obj.cc | 2+-
renderer.h | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/obj.cc b/obj.cc @@ -33,7 +33,7 @@ Mesh load_obj( const char * path, MemoryArena * arena ) { positions[ i ] = data_positions[ idx.v_idx ]; normals[ i ] = data_normals[ idx.vn_idx ]; uvs[ i ] = data_uvs[ idx.vt_idx ]; - colours[ i ] = v3( 0.2, 0.6, 0 ); + colours[ i ] = v3( 0.2f, 0.6f, 0.0f ); } free( data ); diff --git a/renderer.h b/renderer.h @@ -222,12 +222,12 @@ void renderer_delete_mesh( const Mesh & mesh ); template< typename T > VB renderer_new_vb( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATIC ) { - return renderer_new_vb( data.ptr(), data.num_bytes(), usage ); + return renderer_new_vb( data.ptr(), checked_cast< u32 >( data.num_bytes() ), usage ); } template< typename T > VB renderer_new_ib( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATIC ) { - return renderer_new_ib( data.ptr(), data.num_bytes(), usage ); + return renderer_new_ib( data.ptr(), checked_cast< u32 >( data.num_bytes() ), usage ); } /* @@ -241,7 +241,7 @@ constexpr size_t renderer_ubo_alignment() { template<> constexpr size_t renderer_ubo_alignment< v3 >() { - return sizeof( v4 ); + return sizeof( float ) * 4; } template< typename T >