Changeset 116 for trunk/src/gl
- Timestamp:
- 06/11/13 22:33:08 (12 years ago)
- Location:
- trunk/src/gl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_context.cc
r108 r116 363 363 p->bind(); 364 364 va->bind(); 365 glDrawArrays( primitive_to_enum(prim), 0, count); 365 if ( va->has_index_buffer() ) 366 { 367 glDrawElements( primitive_to_enum(prim), count, datatype_to_gl_enum( va->get_index_buffer_type() ), 0 ); 368 } 369 else 370 { 371 glDrawArrays( primitive_to_enum(prim), 0, count); 372 } 366 373 va->unbind(); 367 374 p->unbind(); -
trunk/src/gl/gl_vertex_buffer.cc
r100 r116 92 92 } 93 93 94 if ( m_index ) 95 { 96 m_index->bind(); 97 } 94 98 } 95 99 96 100 void gl_vertex_array::unbind() 97 101 { 102 if ( m_index ) 103 { 104 m_index->unbind(); 105 } 106 98 107 for ( vertex_buffer_attribute_map::iterator i = m_map.begin(); i != m_map.end(); ++i ) 99 108 {
Note: See TracChangeset
for help on using the changeset viewer.