Ignore:
Timestamp:
Apr 14, 2012, 11:33:08 PM (10 years ago)
Author:
sam
Message:

gpu: port the vertex buffer abstraction layer to OpenGL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/tutorial/tut02.cpp

    r1227 r1228  
    192192        g_d3ddevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 0, 0, sizeof(m_indices) / sizeof(*m_indices));
    193193#elif !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__
    194         glEnableVertexAttribArray(m_coord);
    195         glBindBuffer(GL_ARRAY_BUFFER, m_vbo);
    196         glVertexAttribPointer(m_coord, 3, GL_FLOAT, GL_FALSE, 0, 0);
    197 
    198         glEnableVertexAttribArray(m_color);
    199         glBindBuffer(GL_ARRAY_BUFFER, m_cbo);
    200         glVertexAttribPointer(m_color, 3, GL_FLOAT, GL_FALSE, 0, 0);
    201 
    202194        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ibo);
    203195        int size;
     
    207199        glDrawElements(GL_TRIANGLES, size / sizeof(uint16_t), GL_UNSIGNED_SHORT, 0);
    208200
    209         glDisableVertexAttribArray(m_coord);
    210         glDisableVertexAttribArray(m_color);
    211201        glBindBuffer(GL_ARRAY_BUFFER, 0);
    212202#else
Note: See TracChangeset for help on using the changeset viewer.