PDA

View Full Version : glm?



David Doria
11-05-2008, 05:50 AM
I saw on a website "GLUT has functions for reading OBJ model files which includes a function glmReadPPM() that reads .ppm files"

I searched for glm.h and I do not have it. I found this:
https://sourceforge.net/projects/glf/

but it doesn't seem to have glmReadPPM(). I am running linux - does anyone know how to install whatever I need to have glm.h?

Thanks,
Dave

ZbuffeR
11-05-2008, 12:49 PM
your google-fu is weak :)

http://www.cs.kent.edu/~farrell/cg05/reference/natetut/

songho
11-05-2008, 01:36 PM
If you are looking for a PPM image loader, then try this too.
imagePpm.zip (http://www.songho.ca/opengl/files/imagePpm.zip)

It reads both P3(ascii) and P6(binary) formats. The basic usage of this class is;


Image::Ppm ppm;
ppm.read("myfile.ppm");
int width = ppm.getWidth();
int height = ppm.getHeight();
const unsigned char* pixels = ppm.getData();
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels);

David Doria
11-05-2008, 02:02 PM
oh, i mean i found those files just by themselves, but I thought it would be more like an official library I could install?

Is it not?

Thanks,

Dave

dletozeun
11-05-2008, 02:57 PM
It seems that the "glm" you are talking about is just composed of one source file and one header file. So you can insert them in your project directory and compile them in the project makefile. An alternative is to build yourself static and dynamic libraries and put them in your system or IDE lib path which is very easy.