1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 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);
};
//============================================================================
}
//============================================================================
|