Drawing normals and vertices; indexed

I am new to opengl. my problem is simple. I have written a program that parses a triangulated wavefront object file. i would like to draw it using indexed draws as that is how the file is laid out. What i want to do is do an indexed draw for both the vertices and normals into a shader program at the same time to calculate lighting. i have done a basic internet search and looked in my textbook but i haven’t found the solution yet. any help would be greatly appreciated. Thanks!

OBJ has separate indices for each component (position, normal, texture coordinates). In OpenGL, these are all properties of a vertex, so each distinct position+normal combination used in a face definition needs to be a distinct vertex.

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.