Ignore:
Timestamp:
04/29/16 12:42:28 (9 years ago)
Author:
epyon
Message:
  • mass update (will try to do atomic from now)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/particle_engine.cc

    r479 r491  
    497497        info->particles = new particle[ data->quota ];
    498498        info->quads     = new particle_quad[ data->quota ];
    499         info->vtx_array = m_context->create_vertex_array<particle_vtx>( info->quads[0].data, data->quota*6, STREAM_DRAW );
    500         info->vtx_buffer = m_context->find_buffer( info->vtx_array, slot::POSITION );
     499
     500        vertex_array_desc desc;
     501        info->vtx_buffer = m_device->create_buffer( VERTEX_BUFFER, STREAM_DRAW, data->quota * 6 * sizeof( particle_vtx ), info->quads[0].data );
     502        desc.add_vertex_buffers< particle_vtx >( info->vtx_buffer, true );
     503        info->vtx_array = m_context->create_vertex_array( desc );
    501504        info->last_update = m_last_update;
    502505        info->test = false;
Note: See TracChangeset for help on using the changeset viewer.