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"
38 typedef unsigned int GLenum;
39 typedef unsigned int GLbitfield;
40 typedef unsigned int GLuint;
43 typedef unsigned char GLboolean;
44 typedef signed char GLbyte;
45 typedef short GLshort;
46 typedef unsigned char GLubyte;
47 typedef unsigned short GLushort;
48 typedef unsigned long GLulong;
49 typedef float GLfloat;
50 typedef float GLclampf;
51 typedef double GLdouble;
52 typedef double GLclampd;
54 typedef int64_t GLint64EXT;
55 typedef uint64_t GLuint64EXT;
56 typedef GLint64EXT GLint64;
57 typedef GLuint64EXT GLuint64;
59 typedef ptrdiff_t GLintptr;
60 typedef ptrdiff_t GLsizeiptr;
61 typedef ptrdiff_t GLintptrARB;
62 typedef ptrdiff_t GLsizeiptrARB;
63 typedef char GLcharARB;
64 typedef unsigned int GLhandleARB;
66 typedef void (*PFNGLGENQUERIESPROC)(GLsizei, GLuint *);
67 typedef void (*PFNGLDELETEQUERIESPROC)(GLsizei, const GLuint *);
68 typedef void (*PFNGLBEGINQUERYPROC)(GLenum, GLuint);
69 typedef void (*PFNGLENDQUERYPROC)(GLenum);
70 typedef void (*PFNGLGETQUERYOBJECTUIVPROC)(GLuint, GLenum, GLuint *);
72 #define GL_QUERY_RESULT 0x8866
73 #define GL_QUERY_RESULT_AVAILABLE 0x8867
74 #define GL_TIME_ELAPSED 0x88BF
76 extern PFNGLGENQUERIESPROC fips_dispatch_glGenQueries;
77 #define glGenQueries fips_dispatch_glGenQueries
79 extern PFNGLDELETEQUERIESPROC fips_dispatch_glDeleteQueries;
80 #define glDeleteQueries fips_dispatch_glDeleteQueries
82 extern PFNGLBEGINQUERYPROC fips_dispatch_glBeginQuery;
83 #define glBeginQuery fips_dispatch_glBeginQuery
85 extern PFNGLENDQUERYPROC fips_dispatch_glEndQuery;
86 #define glEndQuery fips_dispatch_glEndQuery
88 extern PFNGLGETQUERYOBJECTUIVPROC fips_dispatch_glGetQueryObjectuiv;
89 #define glGetQueryObjectuiv fips_dispatch_glGetQueryObjectuiv
91 #endif /* FIPS_DISPATCH_GL_H */