1 /* Copyright © 2012, Intel Corporation
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 /* This header file provides an interface to (the fips-dispatch subset
23 * of) OpenGL through dynamic dispatch as an alternative to including
26 * No file in fips should include both <GL/gl.h> and
27 * "fips-dispatch-gl.h" (whether directly or indirectly).
30 #ifndef FIPS_DISPATCH_GL_H
31 #define FIPS_DISPATCH_GL_H
33 #include "fips-dispatch.h"
41 #define GL_BYTE 0x1400
42 #define GL_UNSIGNED_BYTE 0x1401
43 #define GL_SHORT 0x1402
44 #define GL_UNSIGNED_SHORT 0x1403
46 #define GL_UNSIGNED_INT 0x1405
47 #define GL_FLOAT 0x1406
48 #define GL_2_BYTES 0x1407
49 #define GL_3_BYTES 0x1408
50 #define GL_4_BYTES 0x1409
51 #define GL_DOUBLE 0x140A
52 #define GL_EXTENSIONS 0x1F03
53 #define GL_NUM_EXTENSIONS 0x821D
55 typedef unsigned int GLenum;
56 typedef unsigned int GLbitfield;
57 typedef unsigned int GLuint;
60 typedef unsigned char GLboolean;
61 typedef signed char GLbyte;
62 typedef short GLshort;
63 typedef unsigned char GLubyte;
64 typedef unsigned short GLushort;
65 typedef unsigned long GLulong;
66 typedef float GLfloat;
67 typedef float GLclampf;
68 typedef double GLdouble;
69 typedef double GLclampd;
71 typedef int64_t GLint64EXT;
72 typedef uint64_t GLuint64EXT;
73 typedef GLint64EXT GLint64;
74 typedef GLuint64EXT GLuint64;
76 typedef ptrdiff_t GLintptr;
77 typedef ptrdiff_t GLsizeiptr;
78 typedef ptrdiff_t GLintptrARB;
79 typedef ptrdiff_t GLsizeiptrARB;
80 typedef char GLcharARB;
81 typedef unsigned int GLhandleARB;
83 typedef void (*PFNGLGETINTEGERVPROC) (GLenum pname, GLint *params);
84 typedef void (*PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params);
85 typedef const GLubyte* (*PFNGLGETSTRINGPROC)(GLenum name);
86 typedef const GLubyte* (*PFNGLGETSTRINGIPROC)(GLenum name, GLuint index);
87 typedef void (*PFNGLGENQUERIESPROC)(GLsizei, GLuint *);
88 typedef void (*PFNGLDELETEQUERIESPROC)(GLsizei, const GLuint *);
89 typedef void (*PFNGLBEGINQUERYPROC)(GLenum, GLuint);
90 typedef void (*PFNGLENDQUERYPROC)(GLenum);
91 typedef void (*PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target);
92 typedef void (*PFNGLGETQUERYOBJECTIVPROC)(GLuint, GLenum, GLint *);
93 typedef void (*PFNGLGETQUERYOBJECTUIVPROC)(GLuint, GLenum, GLuint *);
94 typedef void (*PFNGLGETQUERYOBJECTI64VPROC)(GLuint, GLenum, GLint64 *);
95 typedef void (*PFNGLGETQUERYOBJECTUI64VPROC)(GLuint, GLenum, GLuint64 *);
97 typedef void (*PFNGLGETQUERYIVPROC)(GLenum, GLenum, GLint *);
98 typedef void (*PFNGLGETPERFMONITORGROUPSAMDPROC)(GLint *, GLsizei, GLuint *);
99 typedef void (*PFNGLGETPERFMONITORCOUNTERSAMDPROC)(GLuint, GLint *, GLint *,
101 typedef void (*PFNGLGETPERFMONITORGROUPSTRINGAMDPROC)(GLuint, GLsizei,
102 GLsizei *, GLchar *);
103 typedef void (*PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC)(GLuint, GLuint,
104 GLsizei, GLsizei *, GLchar *);
105 typedef void (*PFNGLGETPERFMONITORCOUNTERINFOAMDPROC)(GLuint, GLuint,
107 typedef void (*PFNGLGENPERFMONITORSAMDPROC)(GLsizei, GLuint *);
108 typedef void (*PFNGLDELETEPERFMONITORSAMDPROC)(GLsizei, GLuint *);
109 typedef void (*PFNGLSELECTPERFMONITORCOUNTERSAMDPROC)(GLuint, GLboolean,
110 GLuint, GLint, GLuint *);
111 typedef void (*PFNGLBEGINPERFMONITORAMDPROC)(GLuint);
112 typedef void (*PFNGLENDPERFMONITORAMDPROC)(GLuint);
113 typedef void (*PFNGLGETPERFMONITORCOUNTERDATAAMDPROC)(GLuint, GLenum,
114 GLsizei, GLuint *, GLint *);
116 typedef void (*PFNGLGETOBJECTLABELPROC)(GLenum, GLuint, GLsizei, GLsizei *, GLchar *);
118 extern PFNGLGETINTEGERVPROC fips_dispatch_glGetIntegerv;
119 #define glGetIntegerv fips_dispatch_glGetIntegerv
121 extern PFNGLGETINTEGER64VPROC fips_dispatch_glGetInteger64v;
122 #define glGetInteger64v fips_dispatch_glGetInteger64v
124 extern PFNGLGETSTRINGPROC fips_dispatch_glGetString;
125 #define glGetString fips_dispatch_glGetString
127 extern PFNGLGETSTRINGIPROC fips_dispatch_glGetStringi;
128 #define glGetStringi fips_dispatch_glGetStringi
130 #define GL_QUERY_RESULT 0x8866
131 #define GL_QUERY_RESULT_AVAILABLE 0x8867
132 #define GL_TIME_ELAPSED 0x88BF
133 #define GL_TIMESTAMP 0x8E28
135 extern PFNGLGENQUERIESPROC fips_dispatch_glGenQueries;
136 #define glGenQueries fips_dispatch_glGenQueries
138 extern PFNGLDELETEQUERIESPROC fips_dispatch_glDeleteQueries;
139 #define glDeleteQueries fips_dispatch_glDeleteQueries
141 extern PFNGLBEGINQUERYPROC fips_dispatch_glBeginQuery;
142 #define glBeginQuery fips_dispatch_glBeginQuery
144 extern PFNGLENDQUERYPROC fips_dispatch_glEndQuery;
145 #define glEndQuery fips_dispatch_glEndQuery
147 extern PFNGLQUERYCOUNTERPROC fips_dispatch_glQueryCounter;
148 #define glQueryCounter fips_dispatch_glQueryCounter
150 extern PFNGLGETQUERYOBJECTIVPROC fips_dispatch_glGetQueryObjectiv;
151 #define glGetQueryObjectiv fips_dispatch_glGetQueryObjectiv
153 extern PFNGLGETQUERYOBJECTUIVPROC fips_dispatch_glGetQueryObjectuiv;
154 #define glGetQueryObjectuiv fips_dispatch_glGetQueryObjectuiv
156 extern PFNGLGETQUERYOBJECTI64VPROC fips_dispatch_glGetQueryObjecti64v;
157 #define glGetQueryObjecti64v fips_dispatch_glGetQueryObjecti64v
159 extern PFNGLGETQUERYOBJECTUI64VPROC fips_dispatch_glGetQueryObjectui64v;
160 #define glGetQueryObjectui64v fips_dispatch_glGetQueryObjectui64v
162 extern PFNGLGETQUERYIVPROC fips_dispatch_glGetQueryiv;
163 #define glGetQueryiv fips_dispatch_glGetQueryiv
165 #define GL_QUERY_COUNTER_BITS 0x8864
166 #define GL_COUNTER_TYPE_AMD 0x8BC0
167 #define GL_COUNTER_RANGE_AMD 0x8BC1
168 #define GL_UNSIGNED_INT64_AMD 0x8BC2
169 #define GL_PERCENTAGE_AMD 0x8BC3
170 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
171 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
172 #define GL_PERFMON_RESULT_AMD 0x8BC6
174 extern PFNGLGETPERFMONITORGROUPSAMDPROC fips_dispatch_glGetPerfMonitorGroupsAMD;
175 #define glGetPerfMonitorGroupsAMD fips_dispatch_glGetPerfMonitorGroupsAMD
177 extern PFNGLGETPERFMONITORCOUNTERSAMDPROC fips_dispatch_glGetPerfMonitorCountersAMD;
178 #define glGetPerfMonitorCountersAMD fips_dispatch_glGetPerfMonitorCountersAMD
180 extern PFNGLGETPERFMONITORGROUPSTRINGAMDPROC fips_dispatch_glGetPerfMonitorGroupStringAMD;
181 #define glGetPerfMonitorGroupStringAMD fips_dispatch_glGetPerfMonitorGroupStringAMD
183 extern PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC fips_dispatch_glGetPerfMonitorCounterStringAMD;
184 #define glGetPerfMonitorCounterStringAMD fips_dispatch_glGetPerfMonitorCounterStringAMD
186 extern PFNGLGETPERFMONITORCOUNTERINFOAMDPROC fips_dispatch_glGetPerfMonitorCounterInfoAMD;
187 #define glGetPerfMonitorCounterInfoAMD fips_dispatch_glGetPerfMonitorCounterInfoAMD
189 extern PFNGLGENPERFMONITORSAMDPROC fips_dispatch_glGenPerfMonitorsAMD;
190 #define glGenPerfMonitorsAMD fips_dispatch_glGenPerfMonitorsAMD
192 extern PFNGLDELETEPERFMONITORSAMDPROC fips_dispatch_glDeletePerfMonitorsAMD;
193 #define glDeletePerfMonitorsAMD fips_dispatch_glDeletePerfMonitorsAMD
195 extern PFNGLSELECTPERFMONITORCOUNTERSAMDPROC fips_dispatch_glSelectPerfMonitorCountersAMD;
196 #define glSelectPerfMonitorCountersAMD fips_dispatch_glSelectPerfMonitorCountersAMD
198 extern PFNGLBEGINPERFMONITORAMDPROC fips_dispatch_glBeginPerfMonitorAMD;
199 #define glBeginPerfMonitorAMD fips_dispatch_glBeginPerfMonitorAMD
201 extern PFNGLENDPERFMONITORAMDPROC fips_dispatch_glEndPerfMonitorAMD;
202 #define glEndPerfMonitorAMD fips_dispatch_glEndPerfMonitorAMD
204 extern PFNGLGETPERFMONITORCOUNTERDATAAMDPROC fips_dispatch_glGetPerfMonitorCounterDataAMD;
205 #define glGetPerfMonitorCounterDataAMD fips_dispatch_glGetPerfMonitorCounterDataAMD
207 #define GL_BUFFER 0x82E0
208 #define GL_SHADER 0x82E1
209 #define GL_PROGRAM 0x82E2
211 extern PFNGLGETOBJECTLABELPROC fips_dispatch_glGetObjectLabel;
212 #define glGetObjectLabel fips_dispatch_glGetObjectLabel
214 #endif /* FIPS_DISPATCH_GL_H */