|
@@ -52,7 +52,7 @@ bool Texture::charger()
|
|
|
{
|
|
|
// Chargement de l'image dans une surface SDL
|
|
|
|
|
|
- SDL_Surface *imageSDL = SDL_LoadBMP(m_fichierImage.c_str());
|
|
|
+ SDL_Surface *imageSDL = IMG_Load(m_fichierImage.c_str());
|
|
|
|
|
|
if(imageSDL == 0)
|
|
|
{
|
|
@@ -100,11 +100,7 @@ bool Texture::charger()
|
|
|
|
|
|
// Format
|
|
|
|
|
|
- if(imageInversee->format->Rmask == 0xff)
|
|
|
- format = GL_RGB;
|
|
|
-
|
|
|
- else
|
|
|
- format = GL_BGR;
|
|
|
+ format = GL_RGB;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -119,11 +115,7 @@ bool Texture::charger()
|
|
|
|
|
|
// Format
|
|
|
|
|
|
- if(imageInversee->format->Rmask == 0xff)
|
|
|
- format = GL_RGBA;
|
|
|
-
|
|
|
- else
|
|
|
- format = GL_BGRA;
|
|
|
+ format = GL_RGBA;
|
|
|
}
|
|
|
|
|
|
|