Debian Codegraph @

cvd/internal/gl_types.h

raw symbols SCIP
1 // Pulled out of gl_helpers to make documentation neater
2 // Paul Smith 20/4/05
3
4 #ifndef CVD_GL_TYPES_H
5 #define CVD_GL_TYPES_H
6
7 #include <cvd/internal/gles1_types.h>
8
9 namespace CVD
10 {
11
12 namespace gl
13 {
14 template <class C>
15 struct data;
16
17 //Scalar types
18 template <>
19 struct data<unsigned int>
20 {
21 static const int format = GL_LUMINANCE;
22 static const int type = GL_UNSIGNED_INT;
23 };
24
25 template <>
26 struct data<int>
27 {
28 static const int format = GL_LUMINANCE;
29 static const int type = GL_INT;
30 };
31
32 template <>
33 struct data<double>
34 {
35 static const int format = GL_LUMINANCE;
36 static const int type = GL_DOUBLE;
37 };
38
39 //Rgb<*> types
40
41 template <>
42 struct data<Rgb<unsigned int>>
43 {
44 static const int format = GL_RGB;
45 static const int type = GL_UNSIGNED_INT;
46 };
47
48 template <>
49 struct data<Rgb<int>>
50 {
51 static const int format = GL_RGB;
52 static const int type = GL_INT;
53 };
54
55 template <>
56 struct data<Rgb<double>>
57 {
58 static const int format = GL_RGB;
59 static const int type = GL_DOUBLE;
60 };
61
62 //Rgba<*> types
63
64 template <>
65 struct data<Rgba<unsigned int>>
66 {
67 static const int format = GL_RGBA;
68 static const int type = GL_UNSIGNED_INT;
69 };
70
71 template <>
72 struct data<Rgba<int>>
73 {
74 static const int format = GL_RGBA;
75 static const int type = GL_INT;
76 };
77
78 template <>
79 struct data<Rgba<double>>
80 {
81 static const int format = GL_RGBA;
82 static const int type = GL_DOUBLE;
83 };
84
85 //La<*> types
86
87 template <>
88 struct data<La<unsigned int>>
89 {
90 static const int format = GL_LUMINANCE_ALPHA;
91 static const int type = GL_UNSIGNED_INT;
92 };
93
94 template <>
95 struct data<La<int>>
96 {
97 static const int format = GL_LUMINANCE_ALPHA;
98 static const int type = GL_INT;
99 };
100
101 template <>
102 struct data<La<double>>
103 {
104 static const int format = GL_LUMINANCE_ALPHA;
105 static const int type = GL_DOUBLE;
106 };
107
108 };
109
110 };
111
112 #endif