Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 523)
+++ trunk/src/gl/gl_context.cc	(revision 534)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -311,5 +311,5 @@
 }
 
-void nv::gl_context::bind( buffer b, uint32 index, size_t offset /*= 0*/, size_t size /*= 0 */ )
+void nv::gl_context::bind( buffer b, uint32 index, uint32 offset /*= 0*/, uint32 size /*= 0 */ )
 {
 	const gl_buffer_info* info = static_cast< const gl_buffer_info* >( m_device->get_buffer_info( b ) );
@@ -465,5 +465,5 @@
 }
 
-void* nv::gl_context::map_buffer( buffer b, buffer_access ba, size_t offset, size_t length )
+void* nv::gl_context::map_buffer( buffer b, buffer_access ba, uint32 offset, uint32 length )
 {
 	const gl_buffer_info* info = static_cast<const gl_buffer_info*>( m_device->get_buffer_info( b ) );
@@ -492,5 +492,5 @@
 }
 
-// void nv::gl_context::update( buffer b, uint32 index, const void* data, size_t offset, size_t size )
+// void nv::gl_context::update( buffer b, uint32 index, const void* data, uint32 offset, uint32 size )
 // {
 // 	const gl_buffer_info* info = static_cast<const gl_buffer_info*>( m_device->get_buffer_info( b ) );
@@ -506,5 +506,5 @@
 // }
 
-void gl_context::update( buffer b, const void* data, nv::size_t offset, nv::size_t size )
+void gl_context::update( buffer b, const void* data, nv::uint32 offset, nv::uint32 size )
 {
 	const gl_buffer_info* info = static_cast< const gl_buffer_info* >( m_device->get_buffer_info( b ) );
@@ -1020,5 +1020,5 @@
 }
 
-nv::buffer nv::gl_context::create_buffer( buffer_type type, buffer_hint hint, size_t size, const void* source /*= nullptr */ )
+nv::buffer nv::gl_context::create_buffer( buffer_type type, buffer_hint hint, uint32 size, const void* source /*= nullptr */ )
 {
 	buffer result = static_cast<gl_device*>( m_device )->create_buffer( type, hint );
@@ -1027,5 +1027,5 @@
 }
 
-void nv::gl_context::create_buffer( buffer b, size_t size, const void* source /*= nullptr */ )
+void nv::gl_context::create_buffer( buffer b, uint32 size, const void* source /*= nullptr */ )
 {
 	gl_buffer_info* info = static_cast<gl_device*>( m_device )->get_full_buffer_info( b );
@@ -1067,5 +1067,5 @@
 }
 
-void gl_context::draw( primitive prim, const render_state& rs, program p, vertex_array va, nv::size_t count, nv::size_t first )
+void gl_context::draw( primitive prim, const render_state& rs, program p, vertex_array va, nv::uint32 count, nv::uint32 first )
 {
 	apply_render_state( rs );
@@ -1077,5 +1077,5 @@
 		if ( info->index.is_valid() )
 		{
-			glDrawElements( primitive_to_enum(prim), static_cast<GLsizei>( count ), datatype_to_gl_enum( info->index_type ), reinterpret_cast< const void* >( get_datatype_info( info->index_type ).size * first ) );
+			glDrawElements( primitive_to_enum(prim), static_cast<GLsizei>( count ), datatype_to_gl_enum( info->index_type ), reinterpret_cast< const void* >( size_t( get_datatype_info( info->index_type ).size * first ) ) );
 		}
 		else
@@ -1088,5 +1088,5 @@
 }
 
-void nv::gl_context::draw_instanced( primitive prim, const render_state& rs, program p, size_t instances, vertex_array va, size_t count, size_t first /*= 0 */ )
+void nv::gl_context::draw_instanced( primitive prim, const render_state& rs, program p, uint32 instances, vertex_array va, uint32 count, uint32 first /*= 0 */ )
 {
 	apply_render_state( rs );
@@ -1098,5 +1098,5 @@
 		if ( info->index.is_valid() )
 		{
-			glDrawElementsInstanced( primitive_to_enum( prim ), static_cast<GLsizei>( count ), datatype_to_gl_enum( info->index_type ), reinterpret_cast<const void*>( get_datatype_info( info->index_type ).size * first ), instances );
+			glDrawElementsInstanced( primitive_to_enum( prim ), static_cast<GLsizei>( count ), datatype_to_gl_enum( info->index_type ), reinterpret_cast<const void*>( size_t( get_datatype_info( info->index_type ).size * first ) ), instances );
 		}
 		else
