PDA

View Full Version : Importing .OBJ with GLM



karko
05-30-2010, 10:06 AM
Hello,

I try to import some obj objects into my opengl project. Im using Visual Studio 2005 and C++. Yes - I found many solutions and examples of how to use it. The problem is that I have lots of errors while compiling those projects.

Actually I want to use as easy code as it is possible:



//Loading the model
GLMModel* model;
model=glmReadOBJ("c:/models/airplane.obj");
glmVertexNormals(model,180.0,false);//Optional-recalculates and smooths the normals

//Drawing the model
glPushMatrix();
//transformations here...
glmDraw(model,GLM_SMOOTH|GLM_TEXTURE|GLM_MATERIAL) ;
glPopMatrix();



Code found here: found: http://www.gamedev.net/community/forums/topic.asp?topic_id=397812

The first error I get is:

..\scene.cpp(13) : fatal error C1083: Cannot open include file: 'glm-0.3/glm': No such file or directory

This is how I include glm directory in scene.cpp:


#include "scene.hpp"
#include <glm-0.3/glm>

void Scene::ThrowException(char *msg)
{
...

I also tried:


"glm-0.3/glm"


My dir:
http://fotoo.pl/zdjecia/files/2010-05/04c7d7e5.png

Please help :) I really need those obj includes and I cant handle it other way.