22 #ifndef GRAPHICS_TINYGL_COLORMASKS_H 23 #define GRAPHICS_TINYGL_COLORMASKS_H 25 #include "graphics/tinygl/gl.h" 29 template<u
int Format, u
int Type>
44 kRedShift = kGreenBits+kBlueBits,
45 kGreenShift = kBlueBits,
48 kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
49 kRedMask = ((1 << kRedBits) - 1) << kRedShift,
50 kGreenMask = ((1 << kGreenBits) - 1) << kGreenShift,
51 kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift,
53 kRedBlueMask = kRedMask | kBlueMask,
56 typedef uint16 PixelType;
60 struct ColorMasks<TGL_RGBA, TGL_UNSIGNED_SHORT_5_5_5_1> {
70 kRedShift = kGreenBits+kBlueBits+kAlphaBits,
71 kGreenShift = kBlueBits+kAlphaBits,
72 kBlueShift = kAlphaBits,
74 kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
75 kRedMask = ((1 << kRedBits) - 1) << kRedShift,
76 kGreenMask = ((1 << kGreenBits) - 1) << kGreenShift,
77 kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift,
79 kRedBlueMask = kRedMask | kBlueMask
82 typedef uint16 PixelType;
86 struct ColorMasks<TGL_RGBA, TGL_UNSIGNED_SHORT_4_4_4_4> {
96 kRedShift = kGreenBits+kBlueBits+kAlphaBits,
97 kGreenShift = kBlueBits+kAlphaBits,
98 kBlueShift = kAlphaBits,
100 kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
101 kRedMask = ((1 << kRedBits) - 1) << kRedShift,
102 kGreenMask = ((1 << kGreenBits) - 1) << kGreenShift,
103 kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift,
105 kRedBlueMask = kRedMask | kBlueMask
108 typedef uint16 PixelType;
121 #if defined(SCUMM_LITTLE_ENDIAN) 122 kAlphaShift = kRedBits+kGreenBits+kBlueBits,
124 kGreenShift = kRedBits,
125 kBlueShift = kRedBits+kGreenBits,
128 kRedShift = kGreenBits+kBlueBits+kAlphaBits,
129 kGreenShift = kBlueBits+kAlphaBits,
130 kBlueShift = kAlphaBits,
133 kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
134 kRedMask = ((1 << kRedBits) - 1) << kRedShift,
135 kGreenMask = ((1 << kGreenBits) - 1) << kGreenShift,
136 kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift,
138 kRedBlueMask = kRedMask | kBlueMask,
141 typedef uint32 PixelType;
Definition: colormasks.h:30
Definition: colormasks.h:27