class bmp_picture{
public:
bmp_picture();//this Width and Height to automatic values;
void LoadBMPFile(char *filename);// Load a .bmp image file.
void draw_bitmap();
protected:
GLuint ID;
int imageWidth; // Width of a texture.
int imageHeight; // Height of a texture.
};
void bmp_picture::LoadBMPFile(char* filename){
//this is so I can use the image as an OpenGL texture
//this is initialization stuff
ILuint temp;
ilGenImages(1,&temp);
ilBindImage(temp);
ilLoadImage(filename); //loads image from file
imageWidth=ilGetInteger(IL_IMAGE_WIDTH);
imageHeight=ilGetInteger(IL_IMAGE_HEIGHT);
glGenTextures(1,&ID);
ID=ilutGLBindTexImage();
ilDeleteImages(1,&temp);
}
Im using opengl with DevIL.
It compiles fine but when I run it I have those all too familiar "The instruction can not be found". Any help would be apprectiated
With great power comes great reponsibility.
This problem with DevIL is Killing me!
Do you call ilInit() before running your LoadBMPFile-code ?
Not doing this led to crashes for me, although the DevIL documentation claims this shouldn''t happen...
Not doing this led to crashes for me, although the DevIL documentation claims this shouldn''t happen...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement