diff options
Diffstat (limited to 'src/graphics/opengl')
-rw-r--r-- | src/graphics/opengl/gldevice.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index 9f64fab..bbabdd6 100644 --- a/src/graphics/opengl/gldevice.cpp +++ b/src/graphics/opengl/gldevice.cpp @@ -606,7 +606,7 @@ Texture CGLDevice::CreateTexture(ImageData *data, const TextureCreateParams &par } else if (params.format == TEX_IMG_AUTO) { - if (data->surface->format->BytesPerPixel == 4) + if (data->surface->format->Amask != 0) { if ((data->surface->format->Amask == 0xFF000000) && (data->surface->format->Rmask == 0x00FF0000) && @@ -630,7 +630,7 @@ Texture CGLDevice::CreateTexture(ImageData *data, const TextureCreateParams &par convert = true; } } - else if (data->surface->format->BytesPerPixel == 3) + else { if ((data->surface->format->Rmask == 0xFF0000) && (data->surface->format->Gmask == 0x00FF00) && @@ -652,10 +652,6 @@ Texture CGLDevice::CreateTexture(ImageData *data, const TextureCreateParams &par convert = true; } } - else { - GetLogger()->Error("Unknown data surface format"); - assert(false); - } } else assert(false); |