0

I convert one of the .obj model to .h file using obj2opengl.pl

Should it have a .jpg that contain the color of the object? where or how should I get it? is it link to the .mtl file?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982

1 Answers1

4

I convert one of the .obj model to .h file using obj2opengl.pl

Please stop doing that. Use a proper model file loader to load the data.

Should it have a .jpg that contain the color of the object? where or how should I get it? is it link to the .mtl file?

The .mtl file does indeed contain the filename of the texture to be loaded for the model. This is where a file loader comes in really handy. Loading images is best delegated to a image loading library, like DevIL, imlib2 or similar.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • +1 for the "Please stop doing that". This seems to become more and more a common practice, especially for iPhone development it seems. Not good. – Bart Jul 24 '12 at 07:24
  • I'm new to 3D/AR. I run into obj2opengl.pl at every turn as I'm trying to learn how to convert an .obj file into a .h file. I've been trying to understand how to use this script when I came across your comment here. Can you point me towards a 'proper model file loader' please? – j9suvak Mar 01 '13 at 12:08