Browse Source

Plugins: fixed ES build of TgaImageConverter.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
b3d1bd1f9b
  1. 2
      src/Plugins/TgaImageConverter/TgaImageConverter.cpp

2
src/Plugins/TgaImageConverter/TgaImageConverter.cpp

@ -81,7 +81,7 @@ Containers::Array<unsigned char> TgaImageConverter::doExportToData(const ImageRe
std::copy(image.data(), image.data()+pixelSize*image.size().product(), data.begin()+sizeof(TgaHeader));
#ifdef MAGNUM_TARGET_GLES
if(image->format() == ColorFormat::RGB) {
if(image.format() == ColorFormat::RGB) {
auto pixels = reinterpret_cast<Math::Vector3<UnsignedByte>*>(data.begin()+sizeof(TgaHeader));
std::transform(pixels, pixels + image.size().product(), pixels,
[](Math::Vector3<UnsignedByte> pixel) { return swizzle<'b', 'g', 'r'>(pixel); });

Loading…
Cancel
Save