From b1e8889d969f5f88539c47c2afac6c9ea2a2dc11 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Tue, 11 Oct 2016 20:44:26 +0200 Subject: dds/etc1/pbm/pvr: Make those modules and split thirdparty files They are not particularly packaged in Linux distros so we do not facilitate unbundling via SCons. There could be done if/when there is interest. Also s/pnm/pbm/, long-lived typo :) --- thirdparty/pvrtccompressor/PvrTcEncoder.h | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 thirdparty/pvrtccompressor/PvrTcEncoder.h (limited to 'thirdparty/pvrtccompressor/PvrTcEncoder.h') diff --git a/thirdparty/pvrtccompressor/PvrTcEncoder.h b/thirdparty/pvrtccompressor/PvrTcEncoder.h new file mode 100644 index 000000000..b9344367d --- /dev/null +++ b/thirdparty/pvrtccompressor/PvrTcEncoder.h @@ -0,0 +1,40 @@ +//============================================================================ + +#pragma once +#include "ColorRgba.h" + +//============================================================================ + +namespace Javelin +{ +//============================================================================ + + class AlphaBitmap; + class RgbBitmap; + class RgbaBitmap; + + class PvrTcEncoder + { + public: + // Result must be large enough for bitmap.GetArea()/4 bytes + static void EncodeAlpha2Bpp(void* result, const AlphaBitmap& bitmap); + + // Result must be large enough for bitmap.GetArea()/2 bytes + static void EncodeAlpha4Bpp(void* result, const AlphaBitmap& bitmap); + + // Result must be large enough for bitmap.GetArea()/2 bytes + static void EncodeRgb4Bpp(void* result, const RgbBitmap& bitmap); + + // Result must be large enough for bitmap.GetArea()/2 bytes + static void EncodeRgb4Bpp(void* result, const RgbaBitmap& bitmap); + + // Result must be large enough for bitmap.GetArea()/2 bytes + static void EncodeRgba4Bpp(void* result, const RgbaBitmap& bitmap); + + private: + static unsigned GetMortonNumber(int x, int y); + }; + +//============================================================================ +} +//============================================================================ -- cgit v1.2.3-70-g09d2