Problem with Vertex Buffer Objects (VBO) using Indexed data (IBO)

This topic is 3511 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

hi All, I am saving my 3D model data in 3 seperate Indexed Lists which i exported from a Collada file, in the following format..
	VertexList = // N Number of Vertices
{
x1,y1,z1,
x2,y2,z2,
x3,y3,z3,
.....
};
NormalsList = // M Number of Normals
{
x1,y1,z1,
x2,y2,z2,
x3,y3,z3,
.....
};
TexCoordsList = // O Number of TexCoords
{
s1,t1,
s2,t2,
s3,t3,
.....
};

IndexList = // (NumberOfTriangles * 3 * 3) Number of Indices
{
t1.v1.V, t1.v1.N, t1.v1.T, // Triangle 1 Vertix 1 Indices
t1.v2.V, t1.v2.N, t1.v2.T, // Triangle 1 Vertix 2 Indices
t1.v3.V, t1.v3.N, t1.v3.T, // Triangle 1 Vertix 3 Indices

t2.v1.V, t2.v1.N, t2.v1.T, // Triangle 2 Vertix 1 Indices
t2.v2.V, t2.v2.N, t2.v2.T, // Triangle 2 Vertix 2 Indices
t2.v3.V, t2.v3.N, t2.v3.T, // Triangle 2 Vertix 3 Indices

.......................... // And so on
};


Now How collada Compresses those Lists is, that the Size of all those 3 Lists are different, Note "N", "M" and "O" Number of Vertices, Normals and TexCoords respectively... How can i render this data using VBO and glDrawElements() or anything else. except duplicating the vertices which have different set of (Normals,TexCoord) from the vertices List... In Other Words, re-Creating the Vertex Lists and so on.. If i put the Data "As it is" in VBOs each for Verext, Normals and TexCoords and then Put the Indices in an IBO. glDrawElements only considers the count Number of Indices from the List of Indices and Fetches the Same Index Data from all the 3 VBOs (Vertex, Normals, TexCoords)..

1. 1
2. 2
3. 3
Rutin
21
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• Forum Statistics

• Total Topics
633654
• Total Posts
3013170
×