]> git.cworth.org Git - vogl/blob - src/voglcommon/gl_types.h
Initial vogl checkin
[vogl] / src / voglcommon / gl_types.h
1 /**************************************************************************
2  *
3  * Copyright 2013-2014 RAD Game Tools and Valve Software
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  *
24  **************************************************************************/
25
26 #ifndef GL_TYPES_H
27 #define GL_TYPES_H
28
29 // Int type large enough to hold a pointer
30 typedef intptr_t GLsizeiptr;
31 typedef intptr_t GLintptr;
32
33 // ptrdiff_t is only used by these API's, which should always accept positive values:
34 // glBufferDataARB 1 size GLsizeiptrARB
35 // glBufferSubDataARB 2 size GLsizeiptrARB
36 // glGetBufferSubDataARB 2 size GLsizeiptrARB
37 // glBufferSubDataARB 1 offset GLintptrARB
38 // glGetBufferSubDataARB 1 offset GLintptrARB
39 // glBindVideoCaptureStreamBufferNV 3 offset GLintptrARB
40 typedef ptrdiff_t GLsizeiptrARB;
41 typedef ptrdiff_t GLintptrARB;
42
43 typedef char GLcharARB;
44 typedef unsigned char GLchar;
45
46 typedef unsigned int GLhandleARB;
47
48 typedef unsigned short GLhalfARB;
49 typedef unsigned short GLhalfNV;
50 typedef unsigned short GLhalf;
51
52 typedef unsigned int GLenum;
53 typedef unsigned char GLboolean;
54 typedef unsigned int GLbitfield;
55 typedef void GLvoid;
56 typedef signed char GLbyte;      /* 1-byte signed */
57 typedef short GLshort;           /* 2-byte signed */
58 typedef int GLint;               /* 4-byte signed */
59 typedef unsigned char GLubyte;   /* 1-byte unsigned */
60 typedef unsigned short GLushort; /* 2-byte unsigned */
61 typedef unsigned int GLuint;     /* 4-byte unsigned */
62 typedef int GLsizei;             /* 4-byte signed */
63 typedef float GLfloat;           /* single precision float */
64 typedef float GLclampf;          /* single precision float in [0,1] */
65 typedef double GLdouble;         /* double precision float */
66 typedef double GLclampd;         /* double precision float in [0,1] */
67
68 typedef int64_t GLint64;
69 typedef uint64_t GLuint64;
70 typedef int64_t GLint64EXT;
71 typedef uint64_t GLuint64EXT;
72
73 typedef void *GLsync;
74
75 typedef int GLfixed;
76 struct _cl_context;
77 struct _cl_event;
78
79 typedef GLintptr GLvdpauSurfaceNV;
80
81 #define GLAPIENTRY
82 typedef void(GLAPIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam);
83 typedef void(GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam);
84 typedef void(GLAPIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam);
85
86 // XID types actually long's (32 or 64 bit)
87 typedef struct __GLXcontextRec *GLXContext;
88 typedef XID GLXPixmap;
89 typedef XID GLXDrawable;
90
91 typedef struct __GLXFBConfigRec *GLXFBConfig;
92 typedef XID GLXFBConfigID;
93 typedef XID GLXContextID;
94 typedef XID GLXWindow;
95 typedef XID GLXPbuffer;
96
97 typedef void (*__GLXextFuncPtr)(void);
98 typedef XID GLXVideoCaptureDeviceNV;
99 typedef unsigned int GLXVideoDeviceNV;
100
101 #include "gl_enums.inc"
102 #include "glx_enums.inc"
103 #include "glx_ext_enums.inc"
104
105 #endif // GL_TYPES_H