0 Replies - 484 Views - Last Post: 25 April 2011 - 02:26 PM Rate Topic: -----

#1 Kain6622   User is offline

  • D.I.C Regular

Reputation: 19
  • View blog
  • Posts: 268
  • Joined: 18-March 10

.obj file rendering problem.

Posted 25 April 2011 - 02:26 PM

Hi, I'm currently working on a OBJ loader for my opengl programs and have got it so it reads all the data in to the following structure:

The problem I'm having is actually rendering the data to screen, within ObjectData stores another vector for the Faces of the object and within that is a int array of size 3 elements to store the indices of the 3 vertices of the face along with the other data a obj file face has ( texcoords and normals ). When trying to render this to screen the points are positioned correctly but the triangles don't join together in the right order.

Edit: Problem has been resolved, The problem was that I was referencing 1 element further when calling the render function as i was not taking the use of arrays into account. Will upload the whole thing once I've finished it.

Thanks

This post has been edited by Kain6622: 25 April 2011 - 04:45 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1