I think it has something to do with this function
void SDL_loadGLTexture(SDL_Surface* bmpFile, GLuint &textr, GLsizei n/*, int red = NULL, int green = NULL, int blue = NULL*/){ /* Standard OpenGL texture creation code */ glPixelStorei(GL_UNPACK_ALIGNMENT,4); glGenTextures(n,&textr); glBindTexture(GL_TEXTURE_2D,textr); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, 3, bmpFile->w, bmpFile->h, 0, GL_BGR, GL_UNSIGNED_BYTE, bmpFile->pixels);}
if thats not it, it might be in one of these but I honestly have no idea
SDL_Surface* LoadBMP2texture (char* filename, GLuint &text, GLsizei n){ SDL_Surface* temp=SDL_LoadBMP(filename); SDL_loadGLTexture(temp,text,n); return temp;}
void DisplayImage(float x, float y, SDL_Surface* image, GLuint textr, float angle, float scale, bool center=false){ glLoadIdentity(); glBindTexture(GL_TEXTURE_2D, textr); glTranslatef(x,y,0); glRotatef(angle,0.0f,0.0f,1); glBegin(GL_QUADS); if (center == true) { glTexCoord2f(0.0f, 0.0f); glVertex3f(-(image->w/2)*scale, -(image->h/2)*scale,0); glTexCoord2f(1.0f, 0.0f); glVertex3f((image->w/2)*scale, -(image->h/2)*scale, 0); glTexCoord2f(1.0f, 1.0f); glVertex3f((image->w/2)*scale, (image->h/2)*scale, 0); glTexCoord2f(0.0f, 1.0f); glVertex3f(-(image->w/2)*scale, (image->h/2)*scale, 0); } else { glTexCoord2f(0.0f, 0.0f); glVertex3f(1*scale, 1*scale,0); glTexCoord2f(1.0f, 0.0f); glVertex3f(image->w*scale, 1*scale, 0); glTexCoord2f(1.0f, 1.0f); glVertex3f(image->w*scale, image->h*scale, 0); glTexCoord2f(0.0f, 1.0f); glVertex3f(1*scale, image->h*scale, 0); } glEnd();}
Please help :\