medfall

A super great game engine
Log | Files | Refs

commit b89389268bac23dffb475167cbc87a296aa862e1
parent 9042f6a3b35143a27bc75ceba2fa49890153d803
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Aug 30 18:19:11 +0100

Don't overalign uniform matrices

Diffstat:
renderer.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/renderer.h b/renderer.h @@ -252,12 +252,12 @@ VB renderer_new_ib( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATI template< typename T > constexpr size_t renderer_ubo_alignment() { - return align4( sizeof( T ) ); + return min( align4( sizeof( T ) ), 4 * sizeof( float ) ); } template<> constexpr size_t renderer_ubo_alignment< v3 >() { - return sizeof( float ) * 4; + return 4 * sizeof( float ); } template< typename T >