Loading texture using SDL
I'm coding an application with openGL using SDL on Linux. I followed the Nehe tutorial and arrived in the texture section. Here, he uses this :
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage->sizeX,
TextureImage->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage->data);
where TextureImage is AUX_RGBImageRec *TextureImage;
But I can't use GLaux and I don't want to. I've tried to use an SDL_surface instead of AUX_RGBImageRec and use TextureImage->pixels instead of TextureImage->data but it didn't work (I've got a blue square and not a texture).
Can someone explain to me how I can load a texture using SDL ?