The OBJ file format is plain ASCII
ASCII
ASCII, abbreviated from American Standard Code for Information Interchange, is a character-encoding scheme (the IANA prefers the name US-ASCII). ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding s…
Full Answer
How much does an object design Cube cost?
design cube Cinema 4D+ max dae fbx obj $2 $2 c4d max dae fbx obj Free details close Low Poly Base Character 3D Studio+ obj Free Free 3ds obj details close Math Object 110
How much does an abstract Cube cost?
abstract cube Cinema 4D+ max fbx dae obj Free Free c4d max fbx dae obj details close Abstract fragmented cube Blender+ 3ds obj dae fbx $5 $5 blend 3ds obj dae fbx Free details close Sci-Fi Energy Cube Blender+ c4d obj fbx oth
How much does Companion Cube cost?
Companion Cube Blender+ 3ds obj $7 $7 blend 3ds obj Free details close Ruin Aztec Pilar Maya+ max c4d fbx obj Free
How much does a mosaic Cube cost?
mosaic cube Cinema 4D+ max dae fbx obj $6 $6 c4d max dae fbx obj Free details close Diamond Sword Cinema 4D+ max fbx oth obj
Tutorial 7 : Model loading
Until now, we hardcoded our cube directly in the source code. I’m sure you will agree that this was cumbersome and not very handy.
Loading the OBJ
Our function, located in common/objloader.cpp and declared in common/objloader.hpp, will have the following signature :
Using the loaded data
Once we’ve got this, almost nothing changes. Instead of declaring our usual static const GLfloat g_vertex_buffer_data [] = {…}, you declare a std::vector vertices instead (same thing for UVS and normals). You call loadOBJ with the right parameters :
Results
Sorry for the lame texture, I’m NOT a good artist : ( Any contribution welcome !