File: PvrTcEncoder.h

package info (click to toggle)
godot3 3.6.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 229,256 kB
  • sloc: cpp: 853,371; xml: 80,316; ansic: 49,285; cs: 14,559; python: 11,794; java: 9,714; javascript: 4,654; pascal: 1,176; sh: 884; objc: 628; makefile: 182; perl: 2
file content (40 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download | duplicates (4)
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);
	};
	
//============================================================================
}
//============================================================================