Results 1 to 2 of 2

Thread: rendering data with opengl

  1. #1
    Junior Member
    Join Date
    Jul 2006

    rendering data with opengl


    in collada we have 1 array of data for each vertex data (positions, normals, texcoords....) and 1 array of indices (

    ) with the indices to all arrays.

    then when I draw it with opengl I get the array of vertices and the array of vertex indices from

    glVertexPointer(3, GL_FLOAT, 0, (*iter2)->vertexdata);
    glDrawElements(GL_TRIANGLES, (*iter2)->nindices, GL_UNSIGNED_INT, (*iter2)->indices);

    it works but I have no idea about how to send all data (positions, normals, texcoords) to opengl, because I can send only 1 array of indices with glDrawElements and I have 3 arrays of indices in


    will I have to convert the arrays into new vertex, texcoords and normal array with single index array? or maybe other way to send the data to opengl?

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Santa Clara
    You can use the Deindexer conditioner.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts