Browse Source

OpenGL ES build fix.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
0012ec37f7
  1. 8
      src/Plugins/TgaImporter/TgaImporter.cpp

8
src/Plugins/TgaImporter/TgaImporter.cpp

@ -137,12 +137,12 @@ ImageData2D* TgaImporter::doImage2D(UnsignedInt) {
#ifdef MAGNUM_TARGET_GLES
if(format == ImageFormat::RGB) {
auto data = reinterpret_cast<Math::Vector3<UnsignedByte>*>(buffer);
std::transform(data, data + dimensions.product(), data,
auto pixels = reinterpret_cast<Math::Vector3<UnsignedByte>*>(data);
std::transform(pixels, pixels + size.product(), pixels,
[](Math::Vector3<UnsignedByte> pixel) { return swizzle<'b', 'g', 'r'>(pixel); });
} else if(format == ImageFormat::RGBA) {
auto data = reinterpret_cast<Math::Vector4<UnsignedByte>*>(buffer);
std::transform(data, data + dimensions.product(), data,
auto pixels = reinterpret_cast<Math::Vector4<UnsignedByte>*>(data);
std::transform(pixels, pixels + size.product(), pixels,
[](Math::Vector4<UnsignedByte> pixel) { return swizzle<'b', 'g', 'r', 'a'>(pixel); });
}
#endif

Loading…
Cancel
Save