X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=fips-dispatch-gl.h;fp=fips-dispatch-gl.h;h=928d1396f7852d01761213e0a1de66575488d8f2;hb=6475596e655063624dbf54359bd2a45de6a17dd1;hp=0000000000000000000000000000000000000000;hpb=5569357a9fc7189c2bae43773f44ba576583ec2b;p=fips diff --git a/fips-dispatch-gl.h b/fips-dispatch-gl.h new file mode 100644 index 0000000..928d139 --- /dev/null +++ b/fips-dispatch-gl.h @@ -0,0 +1,90 @@ +/* Copyright © 2012, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/* This header file provides an interface to (the fips-dispatch subset + * of) OpenGL through dynamic dispatch as an alternative to including + * . + * + * No file in fips should include both and + * "fips-dispatch-gl.h" (whether directly or indirectly). + */ + +#ifndef FIPS_DISPATCH_GL_H +#define FIPS_DISPATCH_GL_H + +#include "fips-dispatch.h" + +#include +#include + +typedef unsigned int GLenum; +typedef unsigned int GLbitfield; +typedef unsigned int GLuint; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLboolean; +typedef signed char GLbyte; +typedef short GLshort; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned long GLulong; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void GLvoid; +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +typedef GLint64EXT GLint64; +typedef GLuint64EXT GLuint64; +typedef char GLchar; +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +typedef char GLcharARB; +typedef unsigned int GLhandleARB; + +typedef void (*PFNGLGENQUERIESPROC)(GLsizei, GLuint *); +typedef void (*PFNGLDELETEQUERIESPROC)(GLsizei, const GLuint *); +typedef void (*PFNGLBEGINQUERYPROC)(GLenum, GLuint); +typedef void (*PFNGLENDQUERYPROC)(GLenum); +typedef void (*PFNGLGETQUERYOBJECTUIVPROC)(GLuint, GLenum, GLuint *); + +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 + +extern PFNGLGENQUERIESPROC fips_dispatch_glGenQueries; +#define glGenQueries fips_dispatch_glGenQueries + +extern PFNGLDELETEQUERIESPROC fips_dispatch_glDeleteQueries; +#define glDeleteQueries fips_dispatch_glDeleteQueries + +extern PFNGLBEGINQUERYPROC fips_dispatch_glBeginQuery; +#define glBeginQuery fips_dispatch_glBeginQuery + +extern PFNGLENDQUERYPROC fips_dispatch_glEndQuery; +#define glEndQuery fips_dispatch_glEndQuery + +extern PFNGLGETQUERYOBJECTUIVPROC fips_dispatch_glGetQueryObjectuiv; +#define glGetQueryObjectuiv fips_dispatch_glGetQueryObjectuiv + +#endif /* FIPS_DISPATCH_GL_H */