Texture loader?

Started by
12 comments, last by lc_overlord 15 years, 7 months ago
 glGenTextures(1, ℑ);


What are you doing there? You should supply a GLuint variable for this.

glGenTextures(1, &texID);
glBindTexture(GL_TEXTURE_2D, texID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),
ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,
ilGetData());
ilDeleteImages(1, &texid);
Advertisement
That was odd I was actually using & image(for some reason gamedev is changing &_image to a random thingy). And it Still wont compile.
Nvm I figured out the problem. I didn't link to the devil.lib and I had to put it in the same folder as my main.cpp file
use neheTGA.rar, it's a pretty slim tga loader we developed for NeHe.

This topic is closed to new replies.

Advertisement