Advertisement

May I have help with .obj files please?

Started by September 25, 2018 04:10 PM
1 comment, last by Josheir 6 years, 2 months ago

EDIT: SOLVED - MORE OR LESS!

 

I have been trying to get a .obj file to load and display in three dimensions.  The object is a cube. I have spent three days on this and need help, please!  I have tried numerous .obj files trying to get it to work.  I replaced the double slashes with single slashes in the .obj file so that the super simple loader can get the vertexes and indices.

Since I am very stuck, the help would be greatly effective to my experience/learning, may I have the help, please?

ALso, recently I switched the functionality from :  


glDrawArrays (GL_TRIANGLES, 0, 3);

    to   


 lDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0); 

 

 

The code is here (pastebin)    https://pastebin.com/cTLuqaae

The .png of the model and the .obj file are attached too.

 

Thank you,

Josheir

My email is Joshuaeirm@gmail.com.

cube100.obj

cube.png

I switched back to the


	glDrawArrays(GL_TRIANGLES, 0, 36);

version and got it working.  I now have a cube that rotates from a file load, cool!

 

Josheir

This topic is closed to new replies.

Advertisement