Ignore:
Timestamp:
06/11/13 22:33:08 (12 years ago)
Author:
epyon
Message:
  • support for indexed arrays
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_context.cc

    r108 r116  
    363363                p->bind();
    364364                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                }
    366373                va->unbind();
    367374                p->unbind();
Note: See TracChangeset for help on using the changeset viewer.