medfall

A super great game engine
Log | Files | Refs

commit 54bedac24a79a63697ad71008324fb6e09f2d559
parent 4025cf32a4e4d65d1235bf987c005c447537343f
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed, 21 Aug 2019 03:39:32 +0300

Renderer fixes

Diffstat:
Mrenderer.cc | 2+-
Mrenderer.h | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/renderer.cc b/renderer.cc @@ -978,7 +978,7 @@ Shader renderer_new_shader( array< const char * > srcs ) { glGetActiveUniform( program, i, sizeof( name ), &len, &size, &type, name ); if( type == GL_SAMPLER_2D ) { - glUniform1i( i, numtextures ); + glUniform1i( glGetUniformLocation( program, name ), numtextures ); shader.textures[ numtextures ] = fnv1a32( name, len ); numtextures++; } diff --git a/renderer.h b/renderer.h @@ -343,7 +343,7 @@ VB renderer_new_vb( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATI } template< typename T > -VB renderer_new_ib( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATIC ) { +IB renderer_new_ib( const array< T > data, BufferUsage usage = BUFFERUSAGE_STATIC ) { return renderer_new_ib( data.ptr(), checked_cast< u32 >( data.num_bytes() ), usage ); }