diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-10-29 21:59:23 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-10-29 22:04:12 +0100 |
commit | cd97feabb0d3cf808f0332f8d9467f198e8d5d29 (patch) | |
tree | bf358908adf9171e361b13fef0babe0c99eaf91c /src/graphics/opengl | |
parent | 70af33e45d286bc6f62a392d0b967aafdc7548e4 (diff) | |
download | colobot-cd97feabb0d3cf808f0332f8d9467f198e8d5d29.tar.gz colobot-cd97feabb0d3cf808f0332f8d9467f198e8d5d29.tar.bz2 colobot-cd97feabb0d3cf808f0332f8d9467f198e8d5d29.zip |
Revert back "Merge pull request #243 from OdyX/dev-fix-textures-loading"
False alarm, was caused probably by faulty build bot.
This definately should work on all platforms.
Diffstat (limited to 'src/graphics/opengl')
-rw-r--r-- | src/graphics/opengl/gldevice.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index bbabdd6..9f64fab 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->Amask != 0) + if (data->surface->format->BytesPerPixel == 4) { 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 + else if (data->surface->format->BytesPerPixel == 3) { if ((data->surface->format->Rmask == 0xFF0000) && (data->surface->format->Gmask == 0x00FF00) && @@ -652,6 +652,10 @@ Texture CGLDevice::CreateTexture(ImageData *data, const TextureCreateParams &par convert = true; } } + else { + GetLogger()->Error("Unknown data surface format"); + assert(false); + } } else assert(false); |