View Full Version : GLUT + OpenGL + Loading .obj Files and Textures.

Captain Cook
01-19-2011, 08:54 AM
I'm currently trying to do a project to get to know OpenGL and GLUT. Here is what I want to do: I want to create a window with GLUT and load a .obj 3D Obj into it. Then i would like to import a texture and lay it onto that object. From that I will do some texture magic in a second step and alter the texture.

Here is my question. Is there an prewritten thing for that?
I would like to have a starting point for my modifications and not to start from scratch.

Would be great if someone knows if there is such a thing.

Cheers Max

Adrian B
01-19-2011, 09:15 AM
hello ,

there is something allready written , but it also uses the GLM library , which bassicaly draws your model from the .obj file and also applies the texture/material which you asigned to the object in the modelling software (ex: 3ds max , gmax).

the code is easy to understand and to modify , you can download it from here : http://opengl.altuma.ro/load_a_model.zip

there are very usefull explenations on the site , from where the example project is : http://www.3dcodingtutorial.com/opengl/Working-with-3D-models/

and if you want to manually apply the textures there is also a tutorial/project_example for that : http://www.3dcodingtutorial.com/Textures/Loading-Textures.html

this was very usefull to me , hope it will be for you , too .
good luck!

Captain Cook
01-20-2011, 09:55 AM
Hey there,

thanks for the quick reply. I'll give it a shot. It seems to be quite straight forward.

Thanks again and I will post what I did.

Cheers Max

Captain Cook
01-22-2011, 09:05 AM
Hey there, sorry to ask again.
I tried to run that but this Visual Studio stuff is not mine. Do you have that as qt or simple project?


10-23-2012, 06:44 PM
There is something wrong with the GLM program that the compiler is down. But as closing the attribute of the project of WP64, it works well. You know, shit happens, while i change the model the materile library file, it can't work normally! Is your issue solved?