Loading Wavefront Data into VAO and Render It
Posted
by
Jordan LaPrise
on Game Development
See other posts from Game Development
or by Jordan LaPrise
Published on 2014-04-21T19:46:43Z
Indexed on
2014/05/31
16:07 UTC
Read the original article
Hit count: 363
I have successfully loaded a triangulated wavefront(.obj) into 6 vectors, the first 3 vectors contain the locations for vertices, uv coords, and normals. The last three have the indices stored for each of the faces. I have been looking into using VAO's and VBO's to render, and I'm not quite sure how to load and render the data. One of my biggest concerns is the fact that indexed rendering only allows you to have one array of indices, meaning I somehow have to make all of the first three vectors the same size, the only way I thought of doing this, is to make 3 new vertex's of equal size, and load in the data for each face, but that would completely defeat the purpose of indexing. Any help would be appreciated.
Thanks in advance,
Jordan
© Game Development or respective owner