Changeset 534 for trunk/src/gl
- Timestamp:
- 01/12/17 14:41:17 (8 years ago)
- Location:
- trunk/src/gl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_context.cc
r523 r534 1 // Copyright (C) 2012-201 5ChaosForge Ltd1 // Copyright (C) 2012-2017 ChaosForge Ltd 2 2 // http://chaosforge.org/ 3 3 // … … 311 311 } 312 312 313 void nv::gl_context::bind( buffer b, uint32 index, size_t offset /*= 0*/, size_tsize /*= 0 */ )313 void nv::gl_context::bind( buffer b, uint32 index, uint32 offset /*= 0*/, uint32 size /*= 0 */ ) 314 314 { 315 315 const gl_buffer_info* info = static_cast< const gl_buffer_info* >( m_device->get_buffer_info( b ) ); … … 465 465 } 466 466 467 void* nv::gl_context::map_buffer( buffer b, buffer_access ba, size_t offset, size_tlength )467 void* nv::gl_context::map_buffer( buffer b, buffer_access ba, uint32 offset, uint32 length ) 468 468 { 469 469 const gl_buffer_info* info = static_cast<const gl_buffer_info*>( m_device->get_buffer_info( b ) ); … … 492 492 } 493 493 494 // void nv::gl_context::update( buffer b, uint32 index, const void* data, size_t offset, size_tsize )494 // void nv::gl_context::update( buffer b, uint32 index, const void* data, uint32 offset, uint32 size ) 495 495 // { 496 496 // const gl_buffer_info* info = static_cast<const gl_buffer_info*>( m_device->get_buffer_info( b ) ); … … 506 506 // } 507 507 508 void gl_context::update( buffer b, const void* data, nv:: size_t offset, nv::size_tsize )508 void gl_context::update( buffer b, const void* data, nv::uint32 offset, nv::uint32 size ) 509 509 { 510 510 const gl_buffer_info* info = static_cast< const gl_buffer_info* >( m_device->get_buffer_info( b ) ); … … 1020 1020 } 1021 1021 1022 nv::buffer nv::gl_context::create_buffer( buffer_type type, buffer_hint hint, size_tsize, const void* source /*= nullptr */ )1022 nv::buffer nv::gl_context::create_buffer( buffer_type type, buffer_hint hint, uint32 size, const void* source /*= nullptr */ ) 1023 1023 { 1024 1024 buffer result = static_cast<gl_device*>( m_device )->create_buffer( type, hint ); … … 1027 1027 } 1028 1028 1029 void nv::gl_context::create_buffer( buffer b, size_tsize, const void* source /*= nullptr */ )1029 void nv::gl_context::create_buffer( buffer b, uint32 size, const void* source /*= nullptr */ ) 1030 1030 { 1031 1031 gl_buffer_info* info = static_cast<gl_device*>( m_device )->get_full_buffer_info( b ); … … 1067 1067 } 1068 1068 1069 void gl_context::draw( primitive prim, const render_state& rs, program p, vertex_array va, nv:: size_t count, nv::size_tfirst )1069 void gl_context::draw( primitive prim, const render_state& rs, program p, vertex_array va, nv::uint32 count, nv::uint32 first ) 1070 1070 { 1071 1071 apply_render_state( rs ); … … 1077 1077 if ( info->index.is_valid() ) 1078 1078 { 1079 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) );1079 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 ) ) ); 1080 1080 } 1081 1081 else … … 1088 1088 } 1089 1089 1090 void nv::gl_context::draw_instanced( primitive prim, const render_state& rs, program p, size_t instances, vertex_array va, size_t count, size_tfirst /*= 0 */ )1090 void nv::gl_context::draw_instanced( primitive prim, const render_state& rs, program p, uint32 instances, vertex_array va, uint32 count, uint32 first /*= 0 */ ) 1091 1091 { 1092 1092 apply_render_state( rs ); … … 1098 1098 if ( info->index.is_valid() ) 1099 1099 { 1100 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 );1100 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 ); 1101 1101 } 1102 1102 else -
trunk/src/gl/gl_device.cc
r533 r534 1 // Copyright (C) 2012-201 5ChaosForge Ltd1 // Copyright (C) 2012-2017 ChaosForge Ltd 2 2 // http://chaosforge.org/ 3 3 //
Note: See TracChangeset
for help on using the changeset viewer.