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.dev-ui
parent
70af33e45d
commit
cd97feabb0
|
@ -276,7 +276,7 @@ bool CEngine::Create()
|
|||
Math::LoadOrthoProjectionMatrix(m_matProjInterface, 0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f);
|
||||
|
||||
TextureCreateParams params;
|
||||
params.format = TEX_IMG_RGB;
|
||||
params.format = TEX_IMG_AUTO;
|
||||
params.minFilter = TEX_MIN_FILTER_NEAREST;
|
||||
params.magFilter = TEX_MAG_FILTER_NEAREST;
|
||||
params.mipmap = false;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue