-2

I need to render a model in openGL from an obj file(on Android). I got the vertices, texture coordinates, etc. I need help with the faces. They indicate the indices right? What does...

f 41/1/1 38/2/1 45/3/1

mean. I tried rendering it in a few different ways and it turned out to be a jumble. Any help will be great.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Shadow
  • 1
  • 5

1 Answers1

0

Counting from 1, not from 0, that describes a face with three vertices, the first composed of the 41st location (i.e. that at location 40 if your array is zero indexed), with the first texture coordinate and the first normal; that with the 38th location, second texture coordinate and first normal; and that with the 45th location, third texture coordinate and first normal.

Tommy
  • 99,986
  • 12
  • 185
  • 204
  • Thanks, you do need to subtract one. Most of my issue was that I was telling openGL that I was passing in something different. Your answer help too, thanks. – Shadow Sep 22 '16 at 01:40