glm?

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

your google-fu is weak :slight_smile:

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

If you are looking for a PPM image loader, then try this too.
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);

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

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.