PDA

View Full Version : EAccesViolation at loading texture



jirkamelich
12-17-2002, 06:16 AM
Does somebody have any idea why i got error EAccesviolation always when i want to load texture :


AUX_RGBImageRec *Obr1 = auxDIBImageLoad("Data\\Zed.bmp");
glGenTextures(GL_TEXTURE_2D,&Textures[0]);
glBindTexture(GL_TEXTURE_2D,Textures[0]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D,0,3,Obr1->sizeX,Obr1->sizeY,0,GL_RGB,GL_UNSIGNED_BYTE,Obr1->data);
free(Obr1->data);
free(Obr1);

when i dont load the texture it is ok.

Bob
12-17-2002, 07:45 AM
On what line does is fail? When loading the bitmap, when uploading it, or when freeing the memory, or another place?

yakuza
12-17-2002, 08:08 AM
Is "Data\\Zed.bmp" a valid path?