24 #ifndef CVD_GL_TYPES_H
25 #define CVD_GL_TYPES_H
27 #include <OpenGLES/ES2/gl.h>
39 template<
class C>
struct data;
43 template<>
struct data<unsigned char>
45 static const int format=GL_LUMINANCE;
46 static const int type =GL_UNSIGNED_BYTE;
49 template<>
struct data<signed char>
51 static const int format=GL_LUMINANCE;
52 static const int type =GL_BYTE;
55 template<>
struct data<unsigned short>
57 static const int format=GL_LUMINANCE;
58 static const int type =GL_UNSIGNED_SHORT;
61 template<>
struct data<short>
63 static const int format=GL_LUMINANCE;
64 static const int type =GL_SHORT;
67 template<>
struct data<unsigned int>
69 static const int format=GL_LUMINANCE;
70 static const int type =GL_UNSIGNED_INT;
73 template<>
struct data<int>
75 static const int format=GL_LUMINANCE;
76 static const int type =GL_INT;
79 template<>
struct data<float>
81 static const int format=GL_LUMINANCE;
82 static const int type =GL_FLOAT;
95 template<>
struct data<
Rgb<unsigned char> >
97 static const int format=GL_RGB;
98 static const int type =GL_UNSIGNED_BYTE;
103 static const int format=GL_RGB;
104 static const int type =GL_BYTE;
109 static const int format=GL_RGB;
110 static const int type =GL_UNSIGNED_SHORT;
115 static const int format=GL_RGB;
116 static const int type =GL_SHORT;
121 static const int format=GL_RGB;
122 static const int type =GL_UNSIGNED_INT;
127 static const int format=GL_RGB;
128 static const int type =GL_INT;
133 static const int format=GL_RGB;
134 static const int type =GL_FLOAT;
148 static const int format=GL_RGBA;
149 static const int type =GL_UNSIGNED_BYTE;
154 static const int format=GL_RGBA;
155 static const int type =GL_BYTE;
160 static const int format=GL_RGBA;
161 static const int type =GL_UNSIGNED_SHORT;
166 static const int format=GL_RGBA;
167 static const int type =GL_SHORT;
172 static const int format=GL_RGBA;
173 static const int type =GL_UNSIGNED_INT;
178 static const int format=GL_RGBA;
179 static const int type =GL_INT;
184 static const int format=GL_RGBA;
185 static const int type =GL_FLOAT;
196 template<>
struct data<
La<unsigned char> >
198 static const int format=GL_LUMINANCE_ALPHA;
199 static const int type =GL_UNSIGNED_BYTE;
204 static const int format=GL_LUMINANCE_ALPHA;
205 static const int type =GL_BYTE;
208 template<>
struct data<
La<unsigned short> >
210 static const int format=GL_LUMINANCE_ALPHA;
211 static const int type =GL_UNSIGNED_SHORT;
216 static const int format=GL_LUMINANCE_ALPHA;
217 static const int type =GL_SHORT;
220 template<>
struct data<
La<unsigned int> >
222 static const int format=GL_LUMINANCE_ALPHA;
223 static const int type =GL_UNSIGNED_INT;
228 static const int format=GL_LUMINANCE_ALPHA;
229 static const int type =GL_INT;
234 static const int format=GL_LUMINANCE_ALPHA;
235 static const int type =GL_FLOAT;
248 static const int format=GL_RGBA;
249 static const int type =GL_UNSIGNED_BYTE;