├── LICENSE.txt ├── README.rst ├── example └── glatter │ ├── eglgears.c │ ├── glxgears.c │ └── wglgears.c ├── include └── glatter │ ├── glatter.h │ ├── glatter.py │ ├── glatter_config.h │ ├── glatter_def.h │ ├── glatter_platform_headers.h │ ├── headers │ ├── khronos_egl │ │ ├── egl.h │ │ ├── eglext.h │ │ ├── eglplatform.h │ │ └── khrplatform.h │ ├── khronos_gl │ │ ├── KHR │ │ │ └── khrplatform.h │ │ ├── glcorearb.h │ │ ├── glext.h │ │ ├── glxext.h │ │ └── wglext.h │ ├── khronos_gles │ │ ├── gl.h │ │ ├── glext.h │ │ └── glplatform.h │ ├── khronos_gles2 │ │ ├── gl2.h │ │ ├── gl2ext.h │ │ └── gl2platform.h │ ├── khronos_gles3 │ │ ├── gl3.h │ │ ├── gl31.h │ │ ├── gl32.h │ │ └── gl3platform.h │ ├── mesa_gl_basic │ │ ├── gl.h │ │ └── glx.h │ ├── sgi_glu │ │ └── glu.h │ └── windows_gl_basic │ │ ├── GL.h │ │ └── GLU.h │ └── platforms │ ├── glatter_egl_gles2_2_0 │ ├── glatter_EGL_d.h │ ├── glatter_EGL_d_def.h │ ├── glatter_EGL_e2s_def.h │ ├── glatter_EGL_ges_decl.h │ ├── glatter_EGL_ges_def.h │ ├── glatter_EGL_r.h │ ├── glatter_EGL_r_def.h │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ └── glatter_GL_r_def.h │ ├── glatter_egl_gles_1_1 │ ├── glatter_EGL_d.h │ ├── glatter_EGL_d_def.h │ ├── glatter_EGL_e2s_def.h │ ├── glatter_EGL_ges_decl.h │ ├── glatter_EGL_ges_def.h │ ├── glatter_EGL_r.h │ ├── glatter_EGL_r_def.h │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ └── glatter_GL_r_def.h │ ├── glatter_egl_gles_3_0 │ ├── glatter_EGL_d.h │ ├── glatter_EGL_d_def.h │ ├── glatter_EGL_e2s_def.h │ ├── glatter_EGL_ges_decl.h │ ├── glatter_EGL_ges_def.h │ ├── glatter_EGL_r.h │ ├── glatter_EGL_r_def.h │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ └── glatter_GL_r_def.h │ ├── glatter_egl_gles_3_1 │ ├── glatter_EGL_d.h │ ├── glatter_EGL_d_def.h │ ├── glatter_EGL_e2s_def.h │ ├── glatter_EGL_ges_decl.h │ ├── glatter_EGL_ges_def.h │ ├── glatter_EGL_r.h │ ├── glatter_EGL_r_def.h │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ └── glatter_GL_r_def.h │ ├── glatter_egl_gles_3_2 │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ └── glatter_GL_r_def.h │ ├── glatter_mesa_glx_gl │ ├── glatter_GLU_d.h │ ├── glatter_GLU_d_def.h │ ├── glatter_GLU_e2s_def.h │ ├── glatter_GLU_r.h │ ├── glatter_GLU_r_def.h │ ├── glatter_GLX_d.h │ ├── glatter_GLX_d_def.h │ ├── glatter_GLX_e2s_def.h │ ├── glatter_GLX_ges_decl.h │ ├── glatter_GLX_ges_def.h │ ├── glatter_GLX_r.h │ ├── glatter_GLX_r_def.h │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ └── glatter_GL_r_def.h │ └── glatter_windows_wgl_gl │ ├── glatter_GLU_d.h │ ├── glatter_GLU_d_def.h │ ├── glatter_GLU_e2s_def.h │ ├── glatter_GLU_r.h │ ├── glatter_GLU_r_def.h │ ├── glatter_GL_d.h │ ├── glatter_GL_d_def.h │ ├── glatter_GL_e2s_def.h │ ├── glatter_GL_ges_decl.h │ ├── glatter_GL_ges_def.h │ ├── glatter_GL_r.h │ ├── glatter_GL_r_def.h │ ├── glatter_WGL_d.h │ ├── glatter_WGL_d_def.h │ ├── glatter_WGL_e2s_def.h │ ├── glatter_WGL_ges_decl.h │ ├── glatter_WGL_ges_def.h │ ├── glatter_WGL_r.h │ └── glatter_WGL_r_def.h └── src └── glatter └── glatter.c /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2017, Ioannis Makris 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Glatter 2 | ======= 3 | 4 | Overview 5 | -------- 6 | 7 | Glatter is an OpenGL loading library, with support for GL, GLES, GLU, EGL, GLX, WGL. 8 | In addition to extension loading, it facilitates logging and error checking. 9 | 10 | 11 | Usage 12 | ----- 13 | 14 | Glatter may be used either as a header-only library, or it could alternatively be compiled into the project. 15 | Header-only usage is only available in C++, and may be enabled by defining ``GLATTER_HEADER_ONLY``. 16 | Alternatively, ``src/glatter.c`` may be compiled into the project. 17 | 18 | Glatter requires that the main header ``glatter.h`` is included, wherever its functionality is meant to be used. 19 | As it pulls its own API headers, the system's API headers should not be included. 20 | 21 | There are two Glatter headers files which may be modified by the user, to customize the behaviour of the library, if required: 22 | 23 | - ``glatter_config.h``: 24 | It contains a set of macro declarations, that mostly enable or disable parts of the library's functionality. 25 | - ``glatter_platform_headers.h``: 26 | This is where OpenGL platforms are defined and their corresponding headers included. Changing this file will require that the headers are re-generated, by running glatter.py. 27 | 28 | Glatter does not require explicit loading or initialization calls, and its startup cost is minimal. 29 | 30 | 31 | Checking for extensions 32 | ----------------------- 33 | 34 | Support for extensions in the current context can be queried as follows: 35 | 36 | .. code-block:: c 37 | 38 | if (glatter_GL_ARB_name_of_extension) { 39 | // do stuff... 40 | } 41 | 42 | The first extension support query in the program, will trigger an initialization call, with negligible overhead. 43 | 44 | 45 | Tracing calls, checking errors 46 | ------------------------------ 47 | 48 | For error checking, the extensions ``ARB_debug_output`` and ``KHR_debug`` offer similar functionality, when ``GL_DEBUG_OUTPUT_SYNCHRONOUS`` is enabled. 49 | However, besides implementation support, they require a debug context, i.e. ``{GLX|WGL}_CONTEXT_DEBUG_BIT`` would have to be specified in the attribute list when calling ``{GLX|WGL}_ARB_create_context``. 50 | 51 | Glatter on the other hand, performs this task by wrapping all library calls inside debug versions of each call. 52 | There are two modes of debug operation, which can be switched on and off independently: 53 | 54 | 1. Logging (tracing) every OpenGL call, which can be enabled by defining ``GLATTER_LOG_CALLS`` in the configuration header 55 | 2. Logging only the errors produced by API calls, which may be enabled by defining ``GLATTER_LOG_ERRORS``. This is enabled by default, when ``NDEBUG`` is not defined. 56 | 57 | Traces of calls with GLenum arguments, are shown with their arguments converted to readable strings. 58 | 59 | Here is a pseudo-example, of legacy OpenGL code drawing something, traced with ``GLATTER_LOG_CALLS``: 60 | 61 | .. code-block:: c 62 | 63 | GLboolean r = glIsEnabled(GL_COLOR_MATERIAL); 64 | glBegin(GL_QUAD_STRIP); 65 | // ... 66 | glEnd(); 67 | 68 | For the above, Glatter could produce: 69 | 70 | .. code:: 71 | 72 | GLATTER: in 'c:\repositories\glatter\example\glatter\wglgears.cpp'(133): 73 | GLATTER: glIsEnabled(GL_COLOR_MATERIAL) 74 | GLATTER: returned 0 75 | GLATTER: in 'c:\repositories\glatter\example\glatter\wglgears.cpp'(134): 76 | GLATTER: glBegin(GL_QUAD_STRIP) 77 | GLATTER: in 'c:\repositories\glatter\example\glatter\wglgears.cpp'(145): 78 | GLATTER: glEnd() 79 | 80 | Let's now introduce an error, by passing an invalid enumerator in the glIsEnabled call: 81 | 82 | .. code-block:: c 83 | 84 | GLboolean r = glIsEnabled(GL_FRAMEBUFFER_RENDERABLE); 85 | 86 | 87 | In this case, Glatter could produce: 88 | 89 | .. code:: 90 | 91 | GLATTER: in 'c:\repositories\glatter\example\glatter\wglgears.cpp'(133): 92 | GLATTER: glIsEnabled(GL_FRAMEBUFFER_RENDERABLE) 93 | GLATTER: returned 0 94 | GLATTER: in 'c:\repositories\glatter\example\glatter\wglgears.cpp'(133): 95 | GLATTER: OpenGL call produced GL_INVALID_ENUM error. 96 | 97 | 98 | Header generation 99 | ----------------- 100 | 101 | Glatter's headers work supplementary to the API headers they operate on. They are generated by a python script, which directly parses the API's headers, to produce its own. 102 | A standard set of pre-generated headers is already supplied, which can be used on a fairly broad set of platforms. 103 | If needed, new custom headers for additional platforms can be generated by the python script. 104 | This can be done by following the steps below: 105 | 106 | - place the API's headers under ``include/glatter/headers`` 107 | - define the corresponding platform header set in ``glatter_platform_headers.h``. 108 | - invoke the python script (``include/glatter/glatter.py``) 109 | 110 | Its generated output headers will be written under ``include/glatter/platforms`` 111 | 112 | 113 | License 114 | ------- 115 | The source code of the library is licensed under the Simplified BSD License. 116 | -------------------------------------------------------------------------------- /example/glatter/glxgears.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included 12 | * in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18 | * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | /* $XFree86: xc/programs/glxgears/glxgears.c,v 1.4 2003/10/24 20:38:11 tsi Exp $ */ 22 | 23 | /* 24 | * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT) 25 | * Port by Brian Paul 23 March 2001 26 | * 27 | * Command line options: 28 | * -info print GL implementation information 29 | * 30 | */ 31 | 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | 42 | #define BENCHMARK 43 | 44 | #ifdef BENCHMARK 45 | 46 | /* XXX this probably isn't very portable */ 47 | 48 | #include 49 | #include 50 | 51 | /* return current time (in seconds) */ 52 | static int 53 | current_time(void) 54 | { 55 | struct timeval tv; 56 | struct timezone tz; 57 | (void) gettimeofday(&tv, &tz); 58 | return (int) tv.tv_sec; 59 | } 60 | 61 | #else /*BENCHMARK*/ 62 | 63 | /* dummy */ 64 | static int 65 | current_time(void) 66 | { 67 | return 0; 68 | } 69 | 70 | #endif /*BENCHMARK*/ 71 | 72 | 73 | 74 | #ifndef M_PI 75 | #define M_PI 3.14159265 76 | #endif 77 | 78 | 79 | static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; 80 | static GLint gear1, gear2, gear3; 81 | static GLfloat angle = 0.0; 82 | 83 | 84 | /* 85 | * 86 | * Draw a gear wheel. You'll probably want to call this function when 87 | * building a display list since we do a lot of trig here. 88 | * 89 | * Input: inner_radius - radius of hole at center 90 | * outer_radius - radius at center of teeth 91 | * width - width of gear 92 | * teeth - number of teeth 93 | * tooth_depth - depth of tooth 94 | */ 95 | static void 96 | gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, 97 | GLint teeth, GLfloat tooth_depth) 98 | { 99 | GLint i; 100 | GLfloat r0, r1, r2; 101 | GLfloat angle, da; 102 | GLfloat u, v, len; 103 | 104 | r0 = inner_radius; 105 | r1 = outer_radius - tooth_depth / 2.0; 106 | r2 = outer_radius + tooth_depth / 2.0; 107 | 108 | da = 2.0 * M_PI / teeth / 4.0; 109 | 110 | glShadeModel(GL_FLAT); 111 | 112 | glNormal3f(0.0, 0.0, 1.0); 113 | 114 | /* draw front face */ 115 | glBegin(GL_QUAD_STRIP); 116 | for (i = 0; i <= teeth; i++) { 117 | angle = i * 2.0 * M_PI / teeth; 118 | glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); 119 | glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); 120 | if (i < teeth) { 121 | glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); 122 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 123 | width * 0.5); 124 | } 125 | } 126 | glEnd(); 127 | 128 | /* draw front sides of teeth */ 129 | glBegin(GL_QUADS); 130 | da = 2.0 * M_PI / teeth / 4.0; 131 | for (i = 0; i < teeth; i++) { 132 | angle = i * 2.0 * M_PI / teeth; 133 | 134 | glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); 135 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); 136 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 137 | width * 0.5); 138 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 139 | width * 0.5); 140 | } 141 | glEnd(); 142 | 143 | glNormal3f(0.0, 0.0, -1.0); 144 | 145 | /* draw back face */ 146 | glBegin(GL_QUAD_STRIP); 147 | for (i = 0; i <= teeth; i++) { 148 | angle = i * 2.0 * M_PI / teeth; 149 | glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); 150 | glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); 151 | if (i < teeth) { 152 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 153 | -width * 0.5); 154 | glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); 155 | } 156 | } 157 | glEnd(); 158 | 159 | /* draw back sides of teeth */ 160 | glBegin(GL_QUADS); 161 | da = 2.0 * M_PI / teeth / 4.0; 162 | for (i = 0; i < teeth; i++) { 163 | angle = i * 2.0 * M_PI / teeth; 164 | 165 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 166 | -width * 0.5); 167 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 168 | -width * 0.5); 169 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); 170 | glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); 171 | } 172 | glEnd(); 173 | 174 | /* draw outward faces of teeth */ 175 | glBegin(GL_QUAD_STRIP); 176 | for (i = 0; i < teeth; i++) { 177 | angle = i * 2.0 * M_PI / teeth; 178 | 179 | glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); 180 | glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); 181 | u = r2 * cos(angle + da) - r1 * cos(angle); 182 | v = r2 * sin(angle + da) - r1 * sin(angle); 183 | len = sqrt(u * u + v * v); 184 | u /= len; 185 | v /= len; 186 | glNormal3f(v, -u, 0.0); 187 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); 188 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); 189 | glNormal3f(cos(angle), sin(angle), 0.0); 190 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 191 | width * 0.5); 192 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 193 | -width * 0.5); 194 | u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); 195 | v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); 196 | glNormal3f(v, -u, 0.0); 197 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 198 | width * 0.5); 199 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 200 | -width * 0.5); 201 | glNormal3f(cos(angle), sin(angle), 0.0); 202 | } 203 | 204 | glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); 205 | glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); 206 | 207 | glEnd(); 208 | 209 | glShadeModel(GL_SMOOTH); 210 | 211 | /* draw inside radius cylinder */ 212 | glBegin(GL_QUAD_STRIP); 213 | for (i = 0; i <= teeth; i++) { 214 | angle = i * 2.0 * M_PI / teeth; 215 | glNormal3f(-cos(angle), -sin(angle), 0.0); 216 | glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); 217 | glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); 218 | } 219 | glEnd(); 220 | } 221 | 222 | 223 | static void 224 | draw(void) 225 | { 226 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 227 | 228 | glPushMatrix(); 229 | glRotatef(view_rotx, 1.0, 0.0, 0.0); 230 | glRotatef(view_roty, 0.0, 1.0, 0.0); 231 | glRotatef(view_rotz, 0.0, 0.0, 1.0); 232 | 233 | glPushMatrix(); 234 | glTranslatef(-3.0, -2.0, 0.0); 235 | glRotatef(angle, 0.0, 0.0, 1.0); 236 | glCallList(gear1); 237 | glPopMatrix(); 238 | 239 | glPushMatrix(); 240 | glTranslatef(3.1, -2.0, 0.0); 241 | glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); 242 | glCallList(gear2); 243 | glPopMatrix(); 244 | 245 | glPushMatrix(); 246 | glTranslatef(-3.1, 4.2, 0.0); 247 | glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); 248 | glCallList(gear3); 249 | glPopMatrix(); 250 | 251 | glPopMatrix(); 252 | } 253 | 254 | 255 | /* new window size or exposure */ 256 | static void 257 | reshape(int width, int height) 258 | { 259 | GLfloat h = (GLfloat) height / (GLfloat) width; 260 | 261 | glViewport(0, 0, (GLint) width, (GLint) height); 262 | glMatrixMode(GL_PROJECTION); 263 | glLoadIdentity(); 264 | glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); 265 | glMatrixMode(GL_MODELVIEW); 266 | glLoadIdentity(); 267 | glTranslatef(0.0, 0.0, -40.0); 268 | } 269 | 270 | 271 | static void 272 | init(void) 273 | { 274 | static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; 275 | static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; 276 | static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; 277 | static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; 278 | 279 | glLightfv(GL_LIGHT0, GL_POSITION, pos); 280 | glEnable(GL_CULL_FACE); 281 | glEnable(GL_LIGHTING); 282 | glEnable(GL_LIGHT0); 283 | glEnable(GL_DEPTH_TEST); 284 | 285 | /* make the gears */ 286 | gear1 = glGenLists(1); 287 | glNewList(gear1, GL_COMPILE); 288 | glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); 289 | gear(1.0, 4.0, 1.0, 20, 0.7); 290 | glEndList(); 291 | 292 | gear2 = glGenLists(1); 293 | glNewList(gear2, GL_COMPILE); 294 | glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); 295 | gear(0.5, 2.0, 2.0, 10, 0.7); 296 | glEndList(); 297 | 298 | gear3 = glGenLists(1); 299 | glNewList(gear3, GL_COMPILE); 300 | glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); 301 | gear(1.3, 2.0, 0.5, 10, 0.7); 302 | glEndList(); 303 | 304 | glEnable(GL_NORMALIZE); 305 | } 306 | 307 | 308 | /* 309 | * Create an RGB, double-buffered window. 310 | * Return the window and context handles. 311 | */ 312 | static void 313 | make_window( Display *dpy, const char *name, 314 | int x, int y, int width, int height, 315 | Window *winRet, GLXContext *ctxRet) 316 | { 317 | int attrib[] = { GLX_RGBA, 318 | GLX_RED_SIZE, 1, 319 | GLX_GREEN_SIZE, 1, 320 | GLX_BLUE_SIZE, 1, 321 | GLX_DOUBLEBUFFER, 322 | GLX_DEPTH_SIZE, 1, 323 | None }; 324 | int scrnum; 325 | XSetWindowAttributes attr; 326 | unsigned long mask; 327 | Window root; 328 | Window win; 329 | GLXContext ctx; 330 | XVisualInfo *visinfo; 331 | 332 | scrnum = DefaultScreen( dpy ); 333 | root = RootWindow( dpy, scrnum ); 334 | 335 | visinfo = glXChooseVisual( dpy, scrnum, attrib ); 336 | if (!visinfo) { 337 | printf("Error: couldn't get an RGB, Double-buffered visual\n"); 338 | exit(1); 339 | } 340 | 341 | /* window attributes */ 342 | attr.background_pixel = 0; 343 | attr.border_pixel = 0; 344 | attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); 345 | attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; 346 | mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; 347 | 348 | win = XCreateWindow( dpy, root, 0, 0, width, height, 349 | 0, visinfo->depth, InputOutput, 350 | visinfo->visual, mask, &attr ); 351 | 352 | /* set hints and properties */ 353 | { 354 | XSizeHints sizehints; 355 | sizehints.x = x; 356 | sizehints.y = y; 357 | sizehints.width = width; 358 | sizehints.height = height; 359 | sizehints.flags = USSize | USPosition; 360 | XSetNormalHints(dpy, win, &sizehints); 361 | XSetStandardProperties(dpy, win, name, name, 362 | None, (char **)NULL, 0, &sizehints); 363 | } 364 | 365 | ctx = glXCreateContext( dpy, visinfo, NULL, True ); 366 | if (!ctx) { 367 | printf("Error: glXCreateContext failed\n"); 368 | exit(1); 369 | } 370 | 371 | XFree(visinfo); 372 | 373 | *winRet = win; 374 | *ctxRet = ctx; 375 | } 376 | 377 | 378 | static void 379 | event_loop(Display *dpy, Window win) 380 | { 381 | while (1) { 382 | while (XPending(dpy) > 0) { 383 | XEvent event; 384 | XNextEvent(dpy, &event); 385 | switch (event.type) { 386 | case Expose: 387 | /* we'll redraw below */ 388 | break; 389 | case ConfigureNotify: 390 | reshape(event.xconfigure.width, event.xconfigure.height); 391 | break; 392 | case KeyPress: 393 | { 394 | char buffer[10]; 395 | int code; 396 | code = XLookupKeysym(&event.xkey, 0); 397 | if (code == XK_Left) { 398 | view_roty += 5.0; 399 | } 400 | else if (code == XK_Right) { 401 | view_roty -= 5.0; 402 | } 403 | else if (code == XK_Up) { 404 | view_rotx += 5.0; 405 | } 406 | else if (code == XK_Down) { 407 | view_rotx -= 5.0; 408 | } 409 | else { 410 | (void) XLookupString(&event.xkey, buffer, sizeof(buffer), 411 | NULL, NULL); 412 | if (buffer[0] == 27) { 413 | /* escape */ 414 | return; 415 | } 416 | } 417 | } 418 | } 419 | } 420 | 421 | /* next frame */ 422 | angle += 2.0; 423 | 424 | draw(); 425 | glXSwapBuffers(dpy, win); 426 | 427 | /* calc framerate */ 428 | { 429 | static int t0 = -1; 430 | static int frames = 0; 431 | int t = current_time(); 432 | 433 | if (t0 < 0) 434 | t0 = t; 435 | 436 | frames++; 437 | 438 | if (t - t0 >= 5.0) { 439 | GLfloat seconds = t - t0; 440 | GLfloat fps = frames / seconds; 441 | printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, 442 | fps); 443 | t0 = t; 444 | frames = 0; 445 | } 446 | } 447 | } 448 | } 449 | 450 | 451 | int 452 | main(int argc, char *argv[]) 453 | { 454 | Display *dpy; 455 | Window win; 456 | GLXContext ctx; 457 | char *dpyName = NULL; 458 | GLboolean printInfo = GL_FALSE; 459 | int i; 460 | 461 | for (i = 1; i < argc; i++) { 462 | if (strcmp(argv[i], "-display") == 0) { 463 | dpyName = argv[i+1]; 464 | i++; 465 | } 466 | else if (strcmp(argv[i], "-info") == 0) { 467 | printInfo = GL_TRUE; 468 | } 469 | } 470 | 471 | dpy = XOpenDisplay(dpyName); 472 | if (!dpy) { 473 | printf("Error: couldn't open display %s\n", dpyName); 474 | return -1; 475 | } 476 | 477 | make_window(dpy, "glxgears", 0, 0, 300, 300, &win, &ctx); 478 | XMapWindow(dpy, win); 479 | glXMakeCurrent(dpy, win, ctx); 480 | reshape(300, 300); 481 | 482 | if (printInfo) { 483 | printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); 484 | printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); 485 | printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); 486 | printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); 487 | } 488 | 489 | init(); 490 | 491 | event_loop(dpy, win); 492 | 493 | glXDestroyContext(dpy, ctx); 494 | XDestroyWindow(dpy, win); 495 | XCloseDisplay(dpy); 496 | 497 | return 0; 498 | } 499 | 500 | -------------------------------------------------------------------------------- /example/glatter/wglgears.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included 12 | * in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18 | * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | /* $XFree86: xc/programs/glxgears/glxgears.c,v 1.3tsi Exp $ */ 22 | 23 | /* 24 | * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT) 25 | * Port by Brian Paul 23 March 2001 26 | * 27 | * Command line options: 28 | * -info print GL implementation information 29 | * 30 | */ 31 | 32 | /* Modified from X11/GLX to Win32/WGL by Ben Skeggs 33 | * 25th October 2004 34 | */ 35 | 36 | /* Modified further by Ioannis Makris, 7.4.2017 37 | */ 38 | 39 | #include 40 | 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | /* XXX this probably isn't very portable */ 48 | #include 49 | 50 | 51 | #ifndef M_PI 52 | #define M_PI 3.14159265 53 | #endif /* !M_PI */ 54 | 55 | /* Turn a NULL pointer string into an empty string */ 56 | #define NULLSTR(x) (((x)!=NULL)?(x):("")) 57 | #define Log(x) { if(verbose) printf x; } 58 | 59 | #define Bool int 60 | #define False 0 61 | #define True 1 62 | 63 | 64 | /* Global vars */ 65 | static HDC hDC; 66 | static HGLRC hRC; 67 | static HWND hWnd; 68 | static HINSTANCE hInst; 69 | static RECT winrect; 70 | 71 | static const char *ProgramName; /* program name (from argv[0]) */ 72 | static Bool verbose = False; /* verbose output what the program is doing */ 73 | 74 | static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; 75 | static GLint gear1, gear2, gear3; 76 | static GLfloat angle = 0.0; 77 | 78 | #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) 79 | #pragma warning( push ) 80 | #pragma warning( disable : 4244) 81 | #pragma warning( disable : 4305) 82 | #endif 83 | 84 | static 85 | void usage(void) 86 | { 87 | fprintf (stderr, "usage: %s [options]\n", ProgramName); 88 | fprintf (stderr, "-info\tPrint additional GL information.\n"); 89 | fprintf (stderr, "-h\tPrint this help page.\n"); 90 | fprintf (stderr, "-v\tVerbose output.\n"); 91 | fprintf (stderr, "\n"); 92 | exit(EXIT_FAILURE); 93 | } 94 | 95 | 96 | /* return current time (in seconds) */ 97 | static int current_time(void) { 98 | return (int)time(NULL); 99 | } 100 | 101 | /* 102 | * 103 | * Draw a gear wheel. You'll probably want to call this function when 104 | * building a display list since we do a lot of trig here. 105 | * 106 | * Input: inner_radius - radius of hole at center 107 | * outer_radius - radius at center of teeth 108 | * width - width of gear 109 | * teeth - number of teeth 110 | * tooth_depth - depth of tooth 111 | */ 112 | static void 113 | gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, 114 | GLint teeth, GLfloat tooth_depth) 115 | { 116 | GLint i; 117 | GLfloat r0, r1, r2; 118 | GLfloat angle, da; 119 | GLfloat u, v, len; 120 | 121 | r0 = inner_radius; 122 | r1 = outer_radius - tooth_depth / 2.0f; 123 | r2 = outer_radius + tooth_depth / 2.0f; 124 | 125 | da = 2.0 * M_PI / teeth / 4.0; 126 | 127 | glShadeModel(GL_FLAT); 128 | 129 | glNormal3f(0.0, 0.0, 1.0); 130 | 131 | glBegin(GL_QUAD_STRIP); 132 | for (i = 0; i <= teeth; i++) { 133 | angle = i * 2.0 * M_PI / teeth; 134 | glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); 135 | glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); 136 | if (i < teeth) { 137 | glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); 138 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 139 | width * 0.5); 140 | } 141 | } 142 | glEnd(); 143 | 144 | /* draw front sides of teeth */ 145 | glBegin(GL_QUADS); 146 | da = 2.0 * M_PI / teeth / 4.0; 147 | for (i = 0; i < teeth; i++) { 148 | angle = i * 2.0 * M_PI / teeth; 149 | 150 | glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); 151 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); 152 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 153 | width * 0.5); 154 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 155 | width * 0.5); 156 | } 157 | glEnd(); 158 | 159 | glNormal3f(0.0, 0.0, -1.0); 160 | 161 | /* draw back face */ 162 | glBegin(GL_QUAD_STRIP); 163 | for (i = 0; i <= teeth; i++) { 164 | angle = i * 2.0 * M_PI / teeth; 165 | glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); 166 | glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); 167 | if (i < teeth) { 168 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 169 | -width * 0.5); 170 | glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); 171 | } 172 | } 173 | glEnd(); 174 | 175 | /* draw back sides of teeth */ 176 | glBegin(GL_QUADS); 177 | da = 2.0 * M_PI / teeth / 4.0; 178 | for (i = 0; i < teeth; i++) { 179 | angle = i * 2.0 * M_PI / teeth; 180 | 181 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 182 | -width * 0.5); 183 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 184 | -width * 0.5); 185 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); 186 | glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); 187 | } 188 | glEnd(); 189 | 190 | /* draw outward faces of teeth */ 191 | glBegin(GL_QUAD_STRIP); 192 | for (i = 0; i < teeth; i++) { 193 | angle = i * 2.0 * M_PI / teeth; 194 | 195 | glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); 196 | glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); 197 | u = r2 * cos(angle + da) - r1 * cos(angle); 198 | v = r2 * sin(angle + da) - r1 * sin(angle); 199 | len = sqrt(u * u + v * v); 200 | u /= len; 201 | v /= len; 202 | glNormal3f(v, -u, 0.0); 203 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); 204 | glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); 205 | glNormal3f(cos(angle), sin(angle), 0.0); 206 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 207 | width * 0.5); 208 | glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), 209 | -width * 0.5); 210 | u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); 211 | v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); 212 | glNormal3f(v, -u, 0.0); 213 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 214 | width * 0.5); 215 | glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), 216 | -width * 0.5); 217 | glNormal3f(cos(angle), sin(angle), 0.0); 218 | } 219 | 220 | glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); 221 | glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); 222 | 223 | glEnd(); 224 | 225 | glShadeModel(GL_SMOOTH); 226 | 227 | /* draw inside radius cylinder */ 228 | glBegin(GL_QUAD_STRIP); 229 | for (i = 0; i <= teeth; i++) { 230 | angle = i * 2.0 * M_PI / teeth; 231 | glNormal3f(-cos(angle), -sin(angle), 0.0); 232 | glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); 233 | glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); 234 | } 235 | glEnd(); 236 | } 237 | 238 | 239 | static void 240 | draw(void) 241 | { 242 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 243 | 244 | glPushMatrix(); 245 | glRotatef(view_rotx, 1.0, 0.0, 0.0); 246 | glRotatef(view_roty, 0.0, 1.0, 0.0); 247 | glRotatef(view_rotz, 0.0, 0.0, 1.0); 248 | 249 | glPushMatrix(); 250 | glTranslatef(-3.0, -2.0, 0.0); 251 | glRotatef(angle, 0.0, 0.0, 1.0); 252 | glCallList(gear1); 253 | glPopMatrix(); 254 | 255 | glPushMatrix(); 256 | glTranslatef(3.1, -2.0, 0.0); 257 | glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); 258 | glCallList(gear2); 259 | glPopMatrix(); 260 | 261 | glPushMatrix(); 262 | glTranslatef(-3.1, 4.2, 0.0); 263 | glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); 264 | glCallList(gear3); 265 | glPopMatrix(); 266 | 267 | glPopMatrix(); 268 | } 269 | 270 | 271 | /* new window size or exposure */ 272 | static void 273 | reshape(int width, int height) 274 | { 275 | GLfloat h = (GLfloat) height / (GLfloat) width; 276 | 277 | glViewport(0, 0, (GLint) width, (GLint) height); 278 | glMatrixMode(GL_PROJECTION); 279 | glLoadIdentity(); 280 | glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); 281 | glMatrixMode(GL_MODELVIEW); 282 | glLoadIdentity(); 283 | glTranslatef(0.0, 0.0, -40.0); 284 | } 285 | 286 | 287 | static void 288 | init(void) 289 | { 290 | static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 0.0f }; 291 | static GLfloat red[4] = { 0.8f, 0.1f, 0.0f, 1.0f }; 292 | static GLfloat green[4] = { 0.0f, 0.8f, 0.2f, 1.0f }; 293 | static GLfloat blue[4] = { 0.2f, 0.2f, 1.0f, 1.0f }; 294 | 295 | glLightfv(GL_LIGHT0, GL_POSITION, pos); 296 | glEnable(GL_CULL_FACE); 297 | glEnable(GL_LIGHTING); 298 | glEnable(GL_LIGHT0); 299 | glEnable(GL_DEPTH_TEST); 300 | 301 | /* make the gears */ 302 | gear1 = glGenLists(1); 303 | glNewList(gear1, GL_COMPILE); 304 | glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); 305 | gear(1.0, 4.0, 1.0, 20, 0.7); 306 | glEndList(); 307 | 308 | gear2 = glGenLists(1); 309 | glNewList(gear2, GL_COMPILE); 310 | glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); 311 | gear(0.5, 2.0, 2.0, 10, 0.7); 312 | glEndList(); 313 | 314 | gear3 = glGenLists(1); 315 | glNewList(gear3, GL_COMPILE); 316 | glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); 317 | gear(1.3, 2.0, 0.5, 10, 0.7); 318 | glEndList(); 319 | 320 | glEnable(GL_NORMALIZE); 321 | } 322 | 323 | LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { 324 | switch (uMsg) { 325 | case WM_CLOSE: 326 | PostQuitMessage(0); 327 | return 0; 328 | case WM_SIZE: 329 | reshape(LOWORD(lParam), HIWORD(lParam)); 330 | return 0; 331 | case WM_KEYDOWN: 332 | if (wParam == VK_LEFT) 333 | view_roty += 5.0; 334 | else if (wParam == VK_RIGHT) 335 | view_roty -= 5.0; 336 | else if (wParam == VK_UP) 337 | view_rotx += 5.0; 338 | else if (wParam == VK_DOWN) 339 | view_rotx -= 5.0; 340 | else if (wParam == VK_ESCAPE) 341 | PostQuitMessage(0); 342 | return 0; 343 | } 344 | 345 | return DefWindowProc(hWnd, uMsg, wParam, lParam); 346 | } 347 | 348 | /* 349 | * Create an RGB, double-buffered window. 350 | * Return the window and context handles. 351 | */ 352 | static void make_window(LPCSTR name, int x, int y, int width, int height) { 353 | GLuint PixelFormat; 354 | WNDCLASS wc; 355 | DWORD dwExStyle, dwStyle; 356 | static PIXELFORMATDESCRIPTOR pfd = { 357 | sizeof(PIXELFORMATDESCRIPTOR), 358 | 1, 359 | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, 360 | PFD_TYPE_RGBA, 361 | 24, 362 | 0, 0, 0, 0, 0, 0, 363 | 0, 364 | 0, 365 | 0, 366 | 0, 0, 0, 0, 367 | 16, 368 | 0, 369 | 0, 370 | PFD_MAIN_PLANE, 371 | 0, 372 | 0, 0, 0 373 | }; 374 | 375 | winrect.left = (long)0; 376 | winrect.right = (long)width; 377 | winrect.top = (long) 0; 378 | winrect.bottom = (long)height; 379 | 380 | hInst = GetModuleHandle(NULL); 381 | wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; 382 | wc.lpfnWndProc = (WNDPROC)WndProc; 383 | wc.cbClsExtra = 0; 384 | wc.cbWndExtra = 0; 385 | wc.hInstance = hInst; 386 | wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); 387 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); 388 | wc.hbrBackground = NULL; 389 | wc.lpszMenuName = NULL; 390 | wc.lpszClassName = name; 391 | if (!RegisterClass(&wc)) { 392 | printf("failed to register class\n"); 393 | exit(0); 394 | } 395 | 396 | dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; 397 | dwStyle = WS_OVERLAPPEDWINDOW; 398 | AdjustWindowRectEx(&winrect, dwStyle, False, dwExStyle); 399 | 400 | if (!(hWnd = CreateWindowEx(dwExStyle, name, name, 401 | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | dwStyle, 0, 0, 402 | winrect.right - winrect.left, winrect.bottom - winrect.top, 403 | NULL, NULL, hInst, NULL))) { 404 | printf("failed to create window\n"); 405 | exit(0); 406 | } 407 | 408 | if (!(hDC = GetDC(hWnd)) || 409 | !(PixelFormat = ChoosePixelFormat(hDC, &pfd)) || 410 | !(SetPixelFormat(hDC, PixelFormat, &pfd)) || 411 | !(hRC = wglCreateContext(hDC)) || 412 | !(wglMakeCurrent(hDC, hRC))) { 413 | printf("failed to initialise opengl\n"); 414 | exit(0); 415 | } 416 | 417 | ShowWindow(hWnd, SW_SHOW); 418 | SetForegroundWindow(hWnd); 419 | SetFocus(hWnd); 420 | } 421 | 422 | 423 | static void event_loop() { 424 | MSG msg; 425 | int t, t0 = current_time(); 426 | int frames = 0; 427 | 428 | while(1) { 429 | if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { 430 | if (msg.message == WM_QUIT) break;; 431 | TranslateMessage(&msg); 432 | DispatchMessage(&msg); 433 | } 434 | 435 | angle += 2.0; 436 | draw(); 437 | SwapBuffers(hDC); 438 | 439 | /* calc framerate */ 440 | t = current_time(); 441 | frames++; 442 | if (t - t0 >= 5.0) { 443 | GLfloat s = t - t0; 444 | GLfloat fps = frames / s; 445 | printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, s, fps); 446 | t0 = t; 447 | frames = 0; 448 | } 449 | } 450 | } 451 | 452 | 453 | int 454 | main(int argc, char *argv[]) 455 | { 456 | int i; 457 | Bool printInfo = False; 458 | 459 | ProgramName = argv[0]; 460 | 461 | for (i = 1; i < argc; i++) { 462 | const char *arg = argv[i]; 463 | int len = strlen(arg); 464 | 465 | if (strcmp(argv[i], "-info") == 0) { 466 | printInfo = GL_TRUE; 467 | } 468 | else if (!strncmp("-v", arg, len)) { 469 | verbose = True; 470 | printInfo = GL_TRUE; 471 | } 472 | else if (strcmp(argv[i], "-h") == 0) { 473 | usage(); 474 | } 475 | else 476 | { 477 | fprintf(stderr, "%s: Unsupported option '%s'.\n", ProgramName, argv[i]); 478 | usage(); 479 | } 480 | } 481 | 482 | 483 | make_window("wglgears", 0, 0, 300, 300); 484 | reshape(300, 300); 485 | 486 | wglSwapIntervalEXT(0); 487 | 488 | if (printInfo) { 489 | printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); 490 | printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); 491 | printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); 492 | printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); 493 | } 494 | 495 | init(); 496 | 497 | event_loop(); 498 | 499 | /* cleanup */ 500 | wglMakeCurrent (NULL, NULL); 501 | wglDeleteContext (hRC); 502 | ReleaseDC (hWnd, hDC); 503 | 504 | return EXIT_SUCCESS; 505 | } 506 | 507 | #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) 508 | #pragma warning( pop ) 509 | #endif 510 | -------------------------------------------------------------------------------- /include/glatter/glatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #ifndef GLATTER_H_DEFINED 27 | #define GLATTER_H_DEFINED 28 | 29 | #include "glatter_config.h" 30 | #include "glatter_platform_headers.h" 31 | 32 | #ifdef __cplusplus 33 | 34 | extern "C" { 35 | 36 | #elif defined (GLATTER_HEADER_ONLY) 37 | 38 | // this can be modified in glatter_config.h 39 | #error GLATTER_HEADER_ONLY can only be used in C++ 40 | 41 | #endif //__cplusplus 42 | 43 | 44 | 45 | #define GLATTER_str(s) #s 46 | #define GLATTER_xstr(s) GLATTER_str(s) 47 | #define GLATTER_PDIR(pd) platforms/pd 48 | 49 | 50 | 51 | #if defined(GLATTER_GL) 52 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GL_ges_decl.h) 53 | #endif 54 | 55 | #if defined(GLATTER_GLX) 56 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GLX_ges_decl.h) 57 | #endif 58 | 59 | #if defined(GLATTER_EGL) 60 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_EGL_ges_decl.h) 61 | #endif 62 | 63 | #if defined(GLATTER_WGL) 64 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_WGL_ges_decl.h) 65 | #endif 66 | 67 | 68 | 69 | #ifdef GLATTER_HEADER_ONLY 70 | 71 | #include "glatter_def.h" 72 | 73 | #if defined(GLATTER_LOG_ERRORS) || defined(GLATTER_LOG_ERRORS) 74 | #define GLATTER_UBLOCK(rtype, cconv, name, dargs)\ 75 | typedef rtype (cconv *glatter_##name##_t) dargs;\ 76 | extern glatter_##name##_t glatter_##name; 77 | #else 78 | #define GLATTER_UBLOCK(...) 79 | #endif 80 | 81 | #else 82 | 83 | #define GLATTER_UBLOCK(rtype, cconv, name, dargs)\ 84 | typedef rtype (cconv *glatter_##name##_t) dargs;\ 85 | extern glatter_##name##_t glatter_##name; 86 | 87 | #endif 88 | 89 | 90 | #ifndef GLATTER_INLINE_OR_NOT 91 | #define GLATTER_INLINE_OR_NOT 92 | #endif 93 | 94 | 95 | #if defined(GLATTER_GL) 96 | GLATTER_INLINE_OR_NOT glatter_extension_support_status_GL_t glatter_get_extension_support_GL(); 97 | GLATTER_INLINE_OR_NOT const char* enum_to_string_GL(GLenum e); 98 | #endif 99 | 100 | #if defined(GLATTER_GLX) 101 | GLATTER_INLINE_OR_NOT glatter_extension_support_status_GLX_t glatter_get_extension_support_GLX(); 102 | GLATTER_INLINE_OR_NOT const char* enum_to_string_GLX(GLenum e); 103 | #endif 104 | 105 | #if defined(GLATTER_EGL) 106 | GLATTER_INLINE_OR_NOT glatter_extension_support_status_EGL_t glatter_get_extension_support_EGL(); 107 | GLATTER_INLINE_OR_NOT const char* enum_to_string_WGL(GLenum e); 108 | #endif 109 | 110 | #if defined(GLATTER_WGL) 111 | GLATTER_INLINE_OR_NOT glatter_extension_support_status_WGL_t glatter_get_extension_support_WGL(); 112 | GLATTER_INLINE_OR_NOT const char* enum_to_string_EGL(GLenum e); 113 | #endif 114 | 115 | #if defined (GLATTER_GLU) 116 | GLATTER_INLINE_OR_NOT const char* enum_to_string_GLU(GLenum e); 117 | #endif 118 | 119 | 120 | #if defined(GLATTER_LOG_ERRORS) || defined(GLATTER_LOG_CALLS) 121 | 122 | #if defined(GLATTER_GL) 123 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GL_d.h) 124 | #endif 125 | 126 | #if defined(GLATTER_GLX) 127 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GLX_d.h) 128 | #endif 129 | 130 | #if defined(GLATTER_EGL) 131 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_EGL_d.h) 132 | #endif 133 | 134 | #if defined(GLATTER_WGL) 135 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_WGL_d.h) 136 | #endif 137 | 138 | #if defined(GLATTER_GLU) 139 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GLU_d.h) 140 | #endif 141 | 142 | #else 143 | 144 | #if defined(GLATTER_GL) 145 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GL_r.h) 146 | #endif 147 | 148 | #if defined(GLATTER_GLX) 149 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GLX_r.h) 150 | #endif 151 | 152 | #if defined(GLATTER_EGL) 153 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_EGL_r.h) 154 | #endif 155 | 156 | #if defined(GLATTER_WGL) 157 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_WGL_r.h) 158 | #endif 159 | 160 | #if defined(GLATTER_GLU) 161 | #include GLATTER_xstr(GLATTER_PDIR(GLATTER_PLATFORM_DIR)/glatter_GLU_r.h) 162 | #endif 163 | 164 | #endif 165 | 166 | 167 | #ifdef __cplusplus 168 | } 169 | #endif 170 | 171 | #endif 172 | -------------------------------------------------------------------------------- /include/glatter/glatter_config.h: -------------------------------------------------------------------------------- 1 | #ifndef GLATTER_CONFIG_H_DEFINED 2 | #define GLATTER_CONFIG_H_DEFINED 3 | 4 | 5 | 6 | ///////////////////////////////// 7 | // Explicit platform selection // 8 | ///////////////////////////////// 9 | // 10 | // NOTE: For GLES the platform must be specified explicitly. 11 | // 12 | // #define GLATTER_WINDOWS_WGL_GL 13 | // #define GLATTER_MESA_GLX_GL 14 | // #define GLATTER_EGL_GLES_1_1 15 | // #define GLATTER_EGL_GLES2_2_0 16 | // #define GLATTER_EGL_GLES_3_0 17 | // #define GLATTER_EGL_GLES_3_1 18 | // #define GLATTER_EGL_GLES_3_2 19 | 20 | // If no platform is defined, it will be set according to the operating system. 21 | #if !defined(GLATTER_WINDOWS_WGL_GL) &&\ 22 | !defined(GLATTER_MESA_GLX_GL) &&\ 23 | !defined(GLATTER_EGL_GLES_1_1) &&\ 24 | !defined(GLATTER_EGL_GLES2_2_0) &&\ 25 | !defined(GLATTER_EGL_GLES_3_0) &&\ 26 | !defined(GLATTER_EGL_GLES_3_1) &&\ 27 | !defined(GLATTER_EGL_GLES_3_2) 28 | 29 | #if defined(_WIN32) 30 | #define GLATTER_WINDOWS_WGL_GL 31 | #elif defined(__linux__) 32 | #define GLATTER_MESA_GLX_GL 33 | #endif 34 | 35 | #endif 36 | 37 | 38 | 39 | //////////////////////////////// 40 | // Explicit wrapper selection // 41 | //////////////////////////////// 42 | // #define GLATTER_GL 43 | // #define GLATTER_EGL 44 | // #define GLATTER_WGL 45 | // #define GLATTER_GLX 46 | // #define GLATTER_GLU 47 | 48 | // If no wrapper is defined, GL is set, and one of ELG/GLX/WGL depending on the platform 49 | #if !defined(GLATTER_GL) && !defined(GLATTER_EGL) && !defined(GLATTER_WGL) &&\ 50 | !defined(GLATTER_GLX) && !defined(GLATTER_GLU) 51 | 52 | #define GLATTER_GL 53 | #if defined(GLATTER_WINDOWS_WGL_GL) 54 | #define GLATTER_WGL 55 | #elif defined (GLATTER_MESA_GLX_GL) 56 | #define GLATTER_GLX 57 | #else // GLES 58 | #define GLATTER_EGL 59 | #endif 60 | 61 | // #define GLATTER_GLU // GLU is not enabled by default 62 | 63 | #endif 64 | 65 | 66 | 67 | //////////////////////////////////////// 68 | // Header-only switch for the library // 69 | //////////////////////////////////////// 70 | #define GLATTER_HEADER_ONLY 71 | 72 | 73 | 74 | ////////////////////////////////////// 75 | // Debugging functionality switches // 76 | ////////////////////////////////////// 77 | // #define GLATTER_LOG_ERRORS 78 | // #define GLATTER_LOG_CALLS 79 | 80 | // Unless specified otherwise, GL errors will be logged in debug builds 81 | #if !defined(GLATTER_LOG_ERRORS) && !defined(GLATTER_LOG_CALLS) 82 | #ifndef NDEBUG 83 | #define GLATTER_LOG_ERRORS 84 | #endif 85 | #endif 86 | 87 | 88 | //////////////////// 89 | // Console output // 90 | //////////////////// 91 | 92 | // Unless defined otherwise, printf will be used for output to the console 93 | #if !defined(GLATTER_PRINTF) 94 | #define GLATTER_PRINTF printf 95 | #endif 96 | 97 | 98 | /////////////////////////////////////////////////// 99 | // X error handler switch (only relevant to GLX) // 100 | /////////////////////////////////////////////////// 101 | //#define GLATTER_DO_NOT_INSTALL_X_ERROR_HANDLER 102 | 103 | 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /include/glatter/glatter_platform_headers.h: -------------------------------------------------------------------------------- 1 | #ifndef GLATTER_PLATFORM_HEADERS_H_DEFINED 2 | #define GLATTER_PLATFORM_HEADERS_H_DEFINED 3 | 4 | // When introducing a new platform, this file needs to be modified. 5 | 6 | // WARNING: This file is processed by glatter.py, which makes certain 7 | // assumptions about its format. 8 | // A platform's header set must be contained within a single #if/ifdef block which 9 | // begins with #define GLATTER_PLATFORM_DIR the_name_of_the_platform_directory 10 | // It is OK to have other/irrelevant statements inside that block. 11 | 12 | 13 | #if defined(GLATTER_WINDOWS_WGL_GL) +\ 14 | defined(GLATTER_MESA_GLX_GL) +\ 15 | defined(GLATTER_EGL_GLES_1_1) +\ 16 | defined(GLATTER_EGL_GLES2_2_0) +\ 17 | defined(GLATTER_EGL_GLES_3_0) +\ 18 | defined(GLATTER_EGL_GLES_3_1) +\ 19 | defined(GLATTER_EGL_GLES_3_2) > 1 20 | 21 | #error Multiple platforms defined. 22 | 23 | #endif 24 | 25 | 26 | #if defined(_WIN32) 27 | #ifndef NOMINMAX 28 | #define NOMINMAX 29 | #endif 30 | #ifndef WIN32_LEAN_AND_MEAN 31 | #define WIN32_LEAN_AND_MEAN 32 | #endif 33 | #include 34 | #elif defined (__linux__) 35 | #include 36 | #include 37 | #else 38 | #error This platform is not supported 39 | #endif 40 | 41 | 42 | #if defined(GLATTER_WINDOWS_WGL_GL) 43 | 44 | #define GLATTER_PLATFORM_DIR glatter_windows_wgl_gl 45 | #include "headers/windows_gl_basic/GL.h" 46 | #include "headers/khronos_gl/glext.h" 47 | #include "headers/khronos_gl/wglext.h" 48 | #if defined(GLATTER_GLU) 49 | #include "headers/windows_gl_basic/GLU.h" 50 | #endif 51 | 52 | #if defined(GLATTER_GLX) || defined(GLATTER_EGL) 53 | #error One of the wrappers defined are not relevant to the selected platform. Please review your glatter_config.h. 54 | #endif 55 | 56 | #elif defined(GLATTER_MESA_GLX_GL) 57 | 58 | #define GLATTER_PLATFORM_DIR glatter_mesa_glx_gl 59 | #define GL_GLEXT_LEGACY // i.e. do not pull glext.h from the system 60 | #include "headers/mesa_gl_basic/gl.h" 61 | #define GLX_GLXEXT_LEGACY // i.e. do not pull glxext.h from the system 62 | #include "headers/mesa_gl_basic/glx.h" 63 | #include "headers/khronos_gl/glext.h" 64 | #include "headers/khronos_gl/glxext.h" 65 | #if defined(GLATTER_GLU) 66 | #include "headers/sgi_glu/glu.h" 67 | #endif 68 | 69 | #if defined(GLATTER_WGL) || defined(GLATTER_EGL) 70 | #error One of the wrappers defined are not relevant to the selected platform. Please review your glatter_config.h. 71 | #endif 72 | 73 | #else 74 | 75 | #if defined(GLATTER_GLU) 76 | #error Glatter does not support a GLU implementation on this platform. Please do not define GLATTER_GLU. 77 | #endif 78 | 79 | #if defined(GLATTER_EGL_GLES_1_1) 80 | 81 | #define GLATTER_PLATFORM_DIR glatter_egl_gles_1_1 82 | #include "headers/khronos_egl/egl.h" 83 | #include "headers/khronos_egl/eglext.h" 84 | #include "headers/khronos_gles/gl.h" 85 | #include "headers/khronos_gles/glext.h" 86 | #include "headers/khronos_gles/glplatform.h" 87 | 88 | #elif defined(GLATTER_EGL_GLES2_2_0) 89 | 90 | #define GLATTER_PLATFORM_DIR glatter_egl_gles2_2_0 91 | #include "headers/khronos_egl/egl.h" 92 | #include "headers/khronos_egl/eglext.h" 93 | #include "headers/khronos_gles2/gl2platform.h" 94 | #include "headers/khronos_gles2/gl2.h" 95 | #include "headers/khronos_gles2/gl2ext.h" 96 | 97 | #elif defined(GLATTER_EGL_GLES_3_0) 98 | 99 | #define GLATTER_PLATFORM_DIR glatter_egl_gles_3_0 100 | #include "headers/khronos_egl/egl.h" 101 | #include "headers/khronos_egl/eglext.h" 102 | #include "headers/khronos_gles3/gl3platform.h" 103 | #include "headers/khronos_gles3/gl3.h" 104 | #include "headers/khronos_gles2/gl2ext.h" 105 | 106 | #elif defined(GLATTER_EGL_GLES_3_1) 107 | 108 | #define GLATTER_PLATFORM_DIR glatter_egl_gles_3_1 109 | #include "headers/khronos_egl/egl.h" 110 | #include "headers/khronos_egl/eglext.h" 111 | #include "headers/khronos_gles3/gl3platform.h" 112 | #include "headers/khronos_gles3/gl31.h" 113 | #include "headers/khronos_gles2/gl2ext.h" 114 | 115 | #elif defined(GLATTER_EGL_GLES_3_2) 116 | 117 | #define GLATTER_PLATFORM_DIR glatter_egl_gles_3_2 118 | #include "headers/khronos_gles3/gl3platform.h" 119 | #include "headers/khronos_gles3/gl32.h" 120 | #include "headers/khronos_gles2/gl2ext.h" 121 | 122 | #endif 123 | 124 | #if defined(GLATTER_GLX) || defined(GLATTER_WGL) 125 | #error One of the wrappers defined are not relevant to the selected platform. Please review your glatter_config.h. 126 | #endif 127 | 128 | #endif 129 | 130 | 131 | #endif 132 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_egl/egl.h: -------------------------------------------------------------------------------- 1 | #ifndef __egl_h_ 2 | #define __egl_h_ 1 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /* 9 | ** Copyright (c) 2013-2017 The Khronos Group Inc. 10 | ** 11 | ** Permission is hereby granted, free of charge, to any person obtaining a 12 | ** copy of this software and/or associated documentation files (the 13 | ** "Materials"), to deal in the Materials without restriction, including 14 | ** without limitation the rights to use, copy, modify, merge, publish, 15 | ** distribute, sublicense, and/or sell copies of the Materials, and to 16 | ** permit persons to whom the Materials are furnished to do so, subject to 17 | ** the following conditions: 18 | ** 19 | ** The above copyright notice and this permission notice shall be included 20 | ** in all copies or substantial portions of the Materials. 21 | ** 22 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 25 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 26 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 27 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 28 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 29 | */ 30 | /* 31 | ** This header is generated from the Khronos OpenGL / OpenGL ES XML 32 | ** API Registry. The current version of the Registry, generator scripts 33 | ** used to make the header, and the header can be found at 34 | ** http://www.khronos.org/registry/egl 35 | ** 36 | ** Khronos $Revision$ on $Date$ 37 | */ 38 | 39 | #include 40 | 41 | /* Generated on date 20170203 */ 42 | 43 | /* Generated C header for: 44 | * API: egl 45 | * Versions considered: .* 46 | * Versions emitted: .* 47 | * Default extensions included: None 48 | * Additional extensions included: _nomatch_^ 49 | * Extensions removed: _nomatch_^ 50 | */ 51 | 52 | #ifndef EGL_VERSION_1_0 53 | #define EGL_VERSION_1_0 1 54 | typedef unsigned int EGLBoolean; 55 | typedef void *EGLDisplay; 56 | #include 57 | #include 58 | typedef void *EGLConfig; 59 | typedef void *EGLSurface; 60 | typedef void *EGLContext; 61 | typedef void (*__eglMustCastToProperFunctionPointerType)(void); 62 | #define EGL_ALPHA_SIZE 0x3021 63 | #define EGL_BAD_ACCESS 0x3002 64 | #define EGL_BAD_ALLOC 0x3003 65 | #define EGL_BAD_ATTRIBUTE 0x3004 66 | #define EGL_BAD_CONFIG 0x3005 67 | #define EGL_BAD_CONTEXT 0x3006 68 | #define EGL_BAD_CURRENT_SURFACE 0x3007 69 | #define EGL_BAD_DISPLAY 0x3008 70 | #define EGL_BAD_MATCH 0x3009 71 | #define EGL_BAD_NATIVE_PIXMAP 0x300A 72 | #define EGL_BAD_NATIVE_WINDOW 0x300B 73 | #define EGL_BAD_PARAMETER 0x300C 74 | #define EGL_BAD_SURFACE 0x300D 75 | #define EGL_BLUE_SIZE 0x3022 76 | #define EGL_BUFFER_SIZE 0x3020 77 | #define EGL_CONFIG_CAVEAT 0x3027 78 | #define EGL_CONFIG_ID 0x3028 79 | #define EGL_CORE_NATIVE_ENGINE 0x305B 80 | #define EGL_DEPTH_SIZE 0x3025 81 | #define EGL_DONT_CARE EGL_CAST(EGLint,-1) 82 | #define EGL_DRAW 0x3059 83 | #define EGL_EXTENSIONS 0x3055 84 | #define EGL_FALSE 0 85 | #define EGL_GREEN_SIZE 0x3023 86 | #define EGL_HEIGHT 0x3056 87 | #define EGL_LARGEST_PBUFFER 0x3058 88 | #define EGL_LEVEL 0x3029 89 | #define EGL_MAX_PBUFFER_HEIGHT 0x302A 90 | #define EGL_MAX_PBUFFER_PIXELS 0x302B 91 | #define EGL_MAX_PBUFFER_WIDTH 0x302C 92 | #define EGL_NATIVE_RENDERABLE 0x302D 93 | #define EGL_NATIVE_VISUAL_ID 0x302E 94 | #define EGL_NATIVE_VISUAL_TYPE 0x302F 95 | #define EGL_NONE 0x3038 96 | #define EGL_NON_CONFORMANT_CONFIG 0x3051 97 | #define EGL_NOT_INITIALIZED 0x3001 98 | #define EGL_NO_CONTEXT EGL_CAST(EGLContext,0) 99 | #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0) 100 | #define EGL_NO_SURFACE EGL_CAST(EGLSurface,0) 101 | #define EGL_PBUFFER_BIT 0x0001 102 | #define EGL_PIXMAP_BIT 0x0002 103 | #define EGL_READ 0x305A 104 | #define EGL_RED_SIZE 0x3024 105 | #define EGL_SAMPLES 0x3031 106 | #define EGL_SAMPLE_BUFFERS 0x3032 107 | #define EGL_SLOW_CONFIG 0x3050 108 | #define EGL_STENCIL_SIZE 0x3026 109 | #define EGL_SUCCESS 0x3000 110 | #define EGL_SURFACE_TYPE 0x3033 111 | #define EGL_TRANSPARENT_BLUE_VALUE 0x3035 112 | #define EGL_TRANSPARENT_GREEN_VALUE 0x3036 113 | #define EGL_TRANSPARENT_RED_VALUE 0x3037 114 | #define EGL_TRANSPARENT_RGB 0x3052 115 | #define EGL_TRANSPARENT_TYPE 0x3034 116 | #define EGL_TRUE 1 117 | #define EGL_VENDOR 0x3053 118 | #define EGL_VERSION 0x3054 119 | #define EGL_WIDTH 0x3057 120 | #define EGL_WINDOW_BIT 0x0004 121 | EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); 122 | EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); 123 | EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); 124 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); 125 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); 126 | EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); 127 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); 128 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); 129 | EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); 130 | EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); 131 | EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void); 132 | EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw); 133 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id); 134 | EGLAPI EGLint EGLAPIENTRY eglGetError (void); 135 | EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); 136 | EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); 137 | EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); 138 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); 139 | EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name); 140 | EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); 141 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface); 142 | EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); 143 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); 144 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); 145 | #endif /* EGL_VERSION_1_0 */ 146 | 147 | #ifndef EGL_VERSION_1_1 148 | #define EGL_VERSION_1_1 1 149 | #define EGL_BACK_BUFFER 0x3084 150 | #define EGL_BIND_TO_TEXTURE_RGB 0x3039 151 | #define EGL_BIND_TO_TEXTURE_RGBA 0x303A 152 | #define EGL_CONTEXT_LOST 0x300E 153 | #define EGL_MIN_SWAP_INTERVAL 0x303B 154 | #define EGL_MAX_SWAP_INTERVAL 0x303C 155 | #define EGL_MIPMAP_TEXTURE 0x3082 156 | #define EGL_MIPMAP_LEVEL 0x3083 157 | #define EGL_NO_TEXTURE 0x305C 158 | #define EGL_TEXTURE_2D 0x305F 159 | #define EGL_TEXTURE_FORMAT 0x3080 160 | #define EGL_TEXTURE_RGB 0x305D 161 | #define EGL_TEXTURE_RGBA 0x305E 162 | #define EGL_TEXTURE_TARGET 0x3081 163 | EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); 164 | EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); 165 | EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); 166 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); 167 | #endif /* EGL_VERSION_1_1 */ 168 | 169 | #ifndef EGL_VERSION_1_2 170 | #define EGL_VERSION_1_2 1 171 | typedef unsigned int EGLenum; 172 | typedef void *EGLClientBuffer; 173 | #define EGL_ALPHA_FORMAT 0x3088 174 | #define EGL_ALPHA_FORMAT_NONPRE 0x308B 175 | #define EGL_ALPHA_FORMAT_PRE 0x308C 176 | #define EGL_ALPHA_MASK_SIZE 0x303E 177 | #define EGL_BUFFER_PRESERVED 0x3094 178 | #define EGL_BUFFER_DESTROYED 0x3095 179 | #define EGL_CLIENT_APIS 0x308D 180 | #define EGL_COLORSPACE 0x3087 181 | #define EGL_COLORSPACE_sRGB 0x3089 182 | #define EGL_COLORSPACE_LINEAR 0x308A 183 | #define EGL_COLOR_BUFFER_TYPE 0x303F 184 | #define EGL_CONTEXT_CLIENT_TYPE 0x3097 185 | #define EGL_DISPLAY_SCALING 10000 186 | #define EGL_HORIZONTAL_RESOLUTION 0x3090 187 | #define EGL_LUMINANCE_BUFFER 0x308F 188 | #define EGL_LUMINANCE_SIZE 0x303D 189 | #define EGL_OPENGL_ES_BIT 0x0001 190 | #define EGL_OPENVG_BIT 0x0002 191 | #define EGL_OPENGL_ES_API 0x30A0 192 | #define EGL_OPENVG_API 0x30A1 193 | #define EGL_OPENVG_IMAGE 0x3096 194 | #define EGL_PIXEL_ASPECT_RATIO 0x3092 195 | #define EGL_RENDERABLE_TYPE 0x3040 196 | #define EGL_RENDER_BUFFER 0x3086 197 | #define EGL_RGB_BUFFER 0x308E 198 | #define EGL_SINGLE_BUFFER 0x3085 199 | #define EGL_SWAP_BEHAVIOR 0x3093 200 | #define EGL_UNKNOWN EGL_CAST(EGLint,-1) 201 | #define EGL_VERTICAL_RESOLUTION 0x3091 202 | EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); 203 | EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); 204 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); 205 | EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); 206 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); 207 | #endif /* EGL_VERSION_1_2 */ 208 | 209 | #ifndef EGL_VERSION_1_3 210 | #define EGL_VERSION_1_3 1 211 | #define EGL_CONFORMANT 0x3042 212 | #define EGL_CONTEXT_CLIENT_VERSION 0x3098 213 | #define EGL_MATCH_NATIVE_PIXMAP 0x3041 214 | #define EGL_OPENGL_ES2_BIT 0x0004 215 | #define EGL_VG_ALPHA_FORMAT 0x3088 216 | #define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B 217 | #define EGL_VG_ALPHA_FORMAT_PRE 0x308C 218 | #define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 219 | #define EGL_VG_COLORSPACE 0x3087 220 | #define EGL_VG_COLORSPACE_sRGB 0x3089 221 | #define EGL_VG_COLORSPACE_LINEAR 0x308A 222 | #define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 223 | #endif /* EGL_VERSION_1_3 */ 224 | 225 | #ifndef EGL_VERSION_1_4 226 | #define EGL_VERSION_1_4 1 227 | #define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0) 228 | #define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 229 | #define EGL_MULTISAMPLE_RESOLVE 0x3099 230 | #define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A 231 | #define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B 232 | #define EGL_OPENGL_API 0x30A2 233 | #define EGL_OPENGL_BIT 0x0008 234 | #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 235 | EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); 236 | #endif /* EGL_VERSION_1_4 */ 237 | 238 | #ifndef EGL_VERSION_1_5 239 | #define EGL_VERSION_1_5 1 240 | typedef void *EGLSync; 241 | typedef intptr_t EGLAttrib; 242 | typedef khronos_utime_nanoseconds_t EGLTime; 243 | typedef void *EGLImage; 244 | #define EGL_CONTEXT_MAJOR_VERSION 0x3098 245 | #define EGL_CONTEXT_MINOR_VERSION 0x30FB 246 | #define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD 247 | #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD 248 | #define EGL_NO_RESET_NOTIFICATION 0x31BE 249 | #define EGL_LOSE_CONTEXT_ON_RESET 0x31BF 250 | #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 251 | #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 252 | #define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 253 | #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 254 | #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 255 | #define EGL_OPENGL_ES3_BIT 0x00000040 256 | #define EGL_CL_EVENT_HANDLE 0x309C 257 | #define EGL_SYNC_CL_EVENT 0x30FE 258 | #define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF 259 | #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 260 | #define EGL_SYNC_TYPE 0x30F7 261 | #define EGL_SYNC_STATUS 0x30F1 262 | #define EGL_SYNC_CONDITION 0x30F8 263 | #define EGL_SIGNALED 0x30F2 264 | #define EGL_UNSIGNALED 0x30F3 265 | #define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 266 | #define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull 267 | #define EGL_TIMEOUT_EXPIRED 0x30F5 268 | #define EGL_CONDITION_SATISFIED 0x30F6 269 | #define EGL_NO_SYNC EGL_CAST(EGLSync,0) 270 | #define EGL_SYNC_FENCE 0x30F9 271 | #define EGL_GL_COLORSPACE 0x309D 272 | #define EGL_GL_COLORSPACE_SRGB 0x3089 273 | #define EGL_GL_COLORSPACE_LINEAR 0x308A 274 | #define EGL_GL_RENDERBUFFER 0x30B9 275 | #define EGL_GL_TEXTURE_2D 0x30B1 276 | #define EGL_GL_TEXTURE_LEVEL 0x30BC 277 | #define EGL_GL_TEXTURE_3D 0x30B2 278 | #define EGL_GL_TEXTURE_ZOFFSET 0x30BD 279 | #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 280 | #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 281 | #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 282 | #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 283 | #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 284 | #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 285 | #define EGL_IMAGE_PRESERVED 0x30D2 286 | #define EGL_NO_IMAGE EGL_CAST(EGLImage,0) 287 | EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); 288 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); 289 | EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); 290 | EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); 291 | EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); 292 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image); 293 | EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); 294 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); 295 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); 296 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); 297 | #endif /* EGL_VERSION_1_5 */ 298 | 299 | #ifdef __cplusplus 300 | } 301 | #endif 302 | 303 | #endif 304 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_egl/eglplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __eglplatform_h_ 2 | #define __eglplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2007-2016 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Platform-specific types and definitions for egl.h 28 | * $Revision: 30994 $ on $Date: 2015-04-30 13:36:48 -0700 (Thu, 30 Apr 2015) $ 29 | * 30 | * Adopters may modify khrplatform.h and this file to suit their platform. 31 | * You are encouraged to submit all modifications to the Khronos group so that 32 | * they can be included in future versions of this file. Please submit changes 33 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 34 | * by filing a bug against product "EGL" component "Registry". 35 | */ 36 | 37 | #include 38 | 39 | /* Macros used in EGL function prototype declarations. 40 | * 41 | * EGL functions should be prototyped as: 42 | * 43 | * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); 44 | * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); 45 | * 46 | * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h 47 | */ 48 | 49 | #ifndef EGLAPI 50 | #define EGLAPI KHRONOS_APICALL 51 | #endif 52 | 53 | #ifndef EGLAPIENTRY 54 | #define EGLAPIENTRY KHRONOS_APIENTRY 55 | #endif 56 | #define EGLAPIENTRYP EGLAPIENTRY* 57 | 58 | /* The types NativeDisplayType, NativeWindowType, and NativePixmapType 59 | * are aliases of window-system-dependent types, such as X Display * or 60 | * Windows Device Context. They must be defined in platform-specific 61 | * code below. The EGL-prefixed versions of Native*Type are the same 62 | * types, renamed in EGL 1.3 so all types in the API start with "EGL". 63 | * 64 | * Khronos STRONGLY RECOMMENDS that you use the default definitions 65 | * provided below, since these changes affect both binary and source 66 | * portability of applications using EGL running on different EGL 67 | * implementations. 68 | */ 69 | 70 | #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ 71 | #ifndef WIN32_LEAN_AND_MEAN 72 | #define WIN32_LEAN_AND_MEAN 1 73 | #endif 74 | #include 75 | 76 | typedef HDC EGLNativeDisplayType; 77 | typedef HBITMAP EGLNativePixmapType; 78 | typedef HWND EGLNativeWindowType; 79 | 80 | #elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ 81 | 82 | typedef int EGLNativeDisplayType; 83 | typedef void *EGLNativeWindowType; 84 | typedef void *EGLNativePixmapType; 85 | 86 | #elif defined(__ANDROID__) || defined(ANDROID) 87 | 88 | #include 89 | 90 | struct egl_native_pixmap_t; 91 | 92 | typedef struct ANativeWindow* EGLNativeWindowType; 93 | typedef struct egl_native_pixmap_t* EGLNativePixmapType; 94 | typedef void* EGLNativeDisplayType; 95 | 96 | #elif defined(__unix__) 97 | 98 | /* X11 (tentative) */ 99 | #include 100 | #include 101 | 102 | typedef Display *EGLNativeDisplayType; 103 | typedef Pixmap EGLNativePixmapType; 104 | typedef Window EGLNativeWindowType; 105 | 106 | #else 107 | #error "Platform not recognized" 108 | #endif 109 | 110 | /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ 111 | typedef EGLNativeDisplayType NativeDisplayType; 112 | typedef EGLNativePixmapType NativePixmapType; 113 | typedef EGLNativeWindowType NativeWindowType; 114 | 115 | 116 | /* Define EGLint. This must be a signed integral type large enough to contain 117 | * all legal attribute names and values passed into and out of EGL, whether 118 | * their type is boolean, bitmask, enumerant (symbolic constant), integer, 119 | * handle, or other. While in general a 32-bit integer will suffice, if 120 | * handles are 64 bit types, then EGLint should be defined as a signed 64-bit 121 | * integer type. 122 | */ 123 | typedef khronos_int32_t EGLint; 124 | 125 | 126 | /* C++ / C typecast macros for special EGL handle values */ 127 | #if defined(__cplusplus) 128 | #define EGL_CAST(type, value) (static_cast(value)) 129 | #else 130 | #define EGL_CAST(type, value) ((type) (value)) 131 | #endif 132 | 133 | #endif /* __eglplatform_h */ 134 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_egl/khrplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __khrplatform_h_ 2 | #define __khrplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2008-2009 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Khronos platform-specific types and definitions. 28 | * 29 | * $Revision: 32517 $ on $Date: 2016-03-11 02:41:19 -0800 (Fri, 11 Mar 2016) $ 30 | * 31 | * Adopters may modify this file to suit their platform. Adopters are 32 | * encouraged to submit platform specific modifications to the Khronos 33 | * group so that they can be included in future versions of this file. 34 | * Please submit changes by sending them to the public Khronos Bugzilla 35 | * (http://khronos.org/bugzilla) by filing a bug against product 36 | * "Khronos (general)" component "Registry". 37 | * 38 | * A predefined template which fills in some of the bug fields can be 39 | * reached using http://tinyurl.com/khrplatform-h-bugreport, but you 40 | * must create a Bugzilla login first. 41 | * 42 | * 43 | * See the Implementer's Guidelines for information about where this file 44 | * should be located on your system and for more details of its use: 45 | * http://www.khronos.org/registry/implementers_guide.pdf 46 | * 47 | * This file should be included as 48 | * #include 49 | * by Khronos client API header files that use its types and defines. 50 | * 51 | * The types in khrplatform.h should only be used to define API-specific types. 52 | * 53 | * Types defined in khrplatform.h: 54 | * khronos_int8_t signed 8 bit 55 | * khronos_uint8_t unsigned 8 bit 56 | * khronos_int16_t signed 16 bit 57 | * khronos_uint16_t unsigned 16 bit 58 | * khronos_int32_t signed 32 bit 59 | * khronos_uint32_t unsigned 32 bit 60 | * khronos_int64_t signed 64 bit 61 | * khronos_uint64_t unsigned 64 bit 62 | * khronos_intptr_t signed same number of bits as a pointer 63 | * khronos_uintptr_t unsigned same number of bits as a pointer 64 | * khronos_ssize_t signed size 65 | * khronos_usize_t unsigned size 66 | * khronos_float_t signed 32 bit floating point 67 | * khronos_time_ns_t unsigned 64 bit time in nanoseconds 68 | * khronos_utime_nanoseconds_t unsigned time interval or absolute time in 69 | * nanoseconds 70 | * khronos_stime_nanoseconds_t signed time interval in nanoseconds 71 | * khronos_boolean_enum_t enumerated boolean type. This should 72 | * only be used as a base type when a client API's boolean type is 73 | * an enum. Client APIs which use an integer or other type for 74 | * booleans cannot use this as the base type for their boolean. 75 | * 76 | * Tokens defined in khrplatform.h: 77 | * 78 | * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. 79 | * 80 | * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. 81 | * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. 82 | * 83 | * Calling convention macros defined in this file: 84 | * KHRONOS_APICALL 85 | * KHRONOS_APIENTRY 86 | * KHRONOS_APIATTRIBUTES 87 | * 88 | * These may be used in function prototypes as: 89 | * 90 | * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( 91 | * int arg1, 92 | * int arg2) KHRONOS_APIATTRIBUTES; 93 | */ 94 | 95 | /*------------------------------------------------------------------------- 96 | * Definition of KHRONOS_APICALL 97 | *------------------------------------------------------------------------- 98 | * This precedes the return type of the function in the function prototype. 99 | */ 100 | #if defined(_WIN32) && !defined(__SCITECH_SNAP__) 101 | # define KHRONOS_APICALL __declspec(dllimport) 102 | #elif defined (__SYMBIAN32__) 103 | # define KHRONOS_APICALL IMPORT_C 104 | #elif defined(__ANDROID__) 105 | # include 106 | # define KHRONOS_APICALL __attribute__((visibility("default"))) __NDK_FPABI__ 107 | #else 108 | # define KHRONOS_APICALL 109 | #endif 110 | 111 | /*------------------------------------------------------------------------- 112 | * Definition of KHRONOS_APIENTRY 113 | *------------------------------------------------------------------------- 114 | * This follows the return type of the function and precedes the function 115 | * name in the function prototype. 116 | */ 117 | #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) 118 | /* Win32 but not WinCE */ 119 | # define KHRONOS_APIENTRY __stdcall 120 | #else 121 | # define KHRONOS_APIENTRY 122 | #endif 123 | 124 | /*------------------------------------------------------------------------- 125 | * Definition of KHRONOS_APIATTRIBUTES 126 | *------------------------------------------------------------------------- 127 | * This follows the closing parenthesis of the function prototype arguments. 128 | */ 129 | #if defined (__ARMCC_2__) 130 | #define KHRONOS_APIATTRIBUTES __softfp 131 | #else 132 | #define KHRONOS_APIATTRIBUTES 133 | #endif 134 | 135 | /*------------------------------------------------------------------------- 136 | * basic type definitions 137 | *-----------------------------------------------------------------------*/ 138 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) 139 | 140 | 141 | /* 142 | * Using 143 | */ 144 | #include 145 | typedef int32_t khronos_int32_t; 146 | typedef uint32_t khronos_uint32_t; 147 | typedef int64_t khronos_int64_t; 148 | typedef uint64_t khronos_uint64_t; 149 | #define KHRONOS_SUPPORT_INT64 1 150 | #define KHRONOS_SUPPORT_FLOAT 1 151 | 152 | #elif defined(__VMS ) || defined(__sgi) 153 | 154 | /* 155 | * Using 156 | */ 157 | #include 158 | typedef int32_t khronos_int32_t; 159 | typedef uint32_t khronos_uint32_t; 160 | typedef int64_t khronos_int64_t; 161 | typedef uint64_t khronos_uint64_t; 162 | #define KHRONOS_SUPPORT_INT64 1 163 | #define KHRONOS_SUPPORT_FLOAT 1 164 | 165 | #elif defined(_WIN32) && !defined(__SCITECH_SNAP__) 166 | 167 | /* 168 | * Win32 169 | */ 170 | typedef __int32 khronos_int32_t; 171 | typedef unsigned __int32 khronos_uint32_t; 172 | typedef __int64 khronos_int64_t; 173 | typedef unsigned __int64 khronos_uint64_t; 174 | #define KHRONOS_SUPPORT_INT64 1 175 | #define KHRONOS_SUPPORT_FLOAT 1 176 | 177 | #elif defined(__sun__) || defined(__digital__) 178 | 179 | /* 180 | * Sun or Digital 181 | */ 182 | typedef int khronos_int32_t; 183 | typedef unsigned int khronos_uint32_t; 184 | #if defined(__arch64__) || defined(_LP64) 185 | typedef long int khronos_int64_t; 186 | typedef unsigned long int khronos_uint64_t; 187 | #else 188 | typedef long long int khronos_int64_t; 189 | typedef unsigned long long int khronos_uint64_t; 190 | #endif /* __arch64__ */ 191 | #define KHRONOS_SUPPORT_INT64 1 192 | #define KHRONOS_SUPPORT_FLOAT 1 193 | 194 | #elif 0 195 | 196 | /* 197 | * Hypothetical platform with no float or int64 support 198 | */ 199 | typedef int khronos_int32_t; 200 | typedef unsigned int khronos_uint32_t; 201 | #define KHRONOS_SUPPORT_INT64 0 202 | #define KHRONOS_SUPPORT_FLOAT 0 203 | 204 | #else 205 | 206 | /* 207 | * Generic fallback 208 | */ 209 | #include 210 | typedef int32_t khronos_int32_t; 211 | typedef uint32_t khronos_uint32_t; 212 | typedef int64_t khronos_int64_t; 213 | typedef uint64_t khronos_uint64_t; 214 | #define KHRONOS_SUPPORT_INT64 1 215 | #define KHRONOS_SUPPORT_FLOAT 1 216 | 217 | #endif 218 | 219 | 220 | /* 221 | * Types that are (so far) the same on all platforms 222 | */ 223 | typedef signed char khronos_int8_t; 224 | typedef unsigned char khronos_uint8_t; 225 | typedef signed short int khronos_int16_t; 226 | typedef unsigned short int khronos_uint16_t; 227 | 228 | /* 229 | * Types that differ between LLP64 and LP64 architectures - in LLP64, 230 | * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears 231 | * to be the only LLP64 architecture in current use. 232 | */ 233 | #ifdef _WIN64 234 | typedef signed long long int khronos_intptr_t; 235 | typedef unsigned long long int khronos_uintptr_t; 236 | typedef signed long long int khronos_ssize_t; 237 | typedef unsigned long long int khronos_usize_t; 238 | #else 239 | typedef signed long int khronos_intptr_t; 240 | typedef unsigned long int khronos_uintptr_t; 241 | typedef signed long int khronos_ssize_t; 242 | typedef unsigned long int khronos_usize_t; 243 | #endif 244 | 245 | #if KHRONOS_SUPPORT_FLOAT 246 | /* 247 | * Float type 248 | */ 249 | typedef float khronos_float_t; 250 | #endif 251 | 252 | #if KHRONOS_SUPPORT_INT64 253 | /* Time types 254 | * 255 | * These types can be used to represent a time interval in nanoseconds or 256 | * an absolute Unadjusted System Time. Unadjusted System Time is the number 257 | * of nanoseconds since some arbitrary system event (e.g. since the last 258 | * time the system booted). The Unadjusted System Time is an unsigned 259 | * 64 bit value that wraps back to 0 every 584 years. Time intervals 260 | * may be either signed or unsigned. 261 | */ 262 | typedef khronos_uint64_t khronos_utime_nanoseconds_t; 263 | typedef khronos_int64_t khronos_stime_nanoseconds_t; 264 | #endif 265 | 266 | /* 267 | * Dummy value used to pad enum types to 32 bits. 268 | */ 269 | #ifndef KHRONOS_MAX_ENUM 270 | #define KHRONOS_MAX_ENUM 0x7FFFFFFF 271 | #endif 272 | 273 | /* 274 | * Enumerated boolean type 275 | * 276 | * Values other than zero should be considered to be true. Therefore 277 | * comparisons should not be made against KHRONOS_TRUE. 278 | */ 279 | typedef enum { 280 | KHRONOS_FALSE = 0, 281 | KHRONOS_TRUE = 1, 282 | KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM 283 | } khronos_boolean_enum_t; 284 | 285 | #endif /* __khrplatform_h_ */ 286 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_gl/KHR/khrplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __khrplatform_h_ 2 | #define __khrplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2008-2018 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Khronos platform-specific types and definitions. 28 | * 29 | * The master copy of khrplatform.h is maintained in the Khronos EGL 30 | * Registry repository at https://github.com/KhronosGroup/EGL-Registry 31 | * The last semantic modification to khrplatform.h was at commit ID: 32 | * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 33 | * 34 | * Adopters may modify this file to suit their platform. Adopters are 35 | * encouraged to submit platform specific modifications to the Khronos 36 | * group so that they can be included in future versions of this file. 37 | * Please submit changes by filing pull requests or issues on 38 | * the EGL Registry repository linked above. 39 | * 40 | * 41 | * See the Implementer's Guidelines for information about where this file 42 | * should be located on your system and for more details of its use: 43 | * http://www.khronos.org/registry/implementers_guide.pdf 44 | * 45 | * This file should be included as 46 | * #include 47 | * by Khronos client API header files that use its types and defines. 48 | * 49 | * The types in khrplatform.h should only be used to define API-specific types. 50 | * 51 | * Types defined in khrplatform.h: 52 | * khronos_int8_t signed 8 bit 53 | * khronos_uint8_t unsigned 8 bit 54 | * khronos_int16_t signed 16 bit 55 | * khronos_uint16_t unsigned 16 bit 56 | * khronos_int32_t signed 32 bit 57 | * khronos_uint32_t unsigned 32 bit 58 | * khronos_int64_t signed 64 bit 59 | * khronos_uint64_t unsigned 64 bit 60 | * khronos_intptr_t signed same number of bits as a pointer 61 | * khronos_uintptr_t unsigned same number of bits as a pointer 62 | * khronos_ssize_t signed size 63 | * khronos_usize_t unsigned size 64 | * khronos_float_t signed 32 bit floating point 65 | * khronos_time_ns_t unsigned 64 bit time in nanoseconds 66 | * khronos_utime_nanoseconds_t unsigned time interval or absolute time in 67 | * nanoseconds 68 | * khronos_stime_nanoseconds_t signed time interval in nanoseconds 69 | * khronos_boolean_enum_t enumerated boolean type. This should 70 | * only be used as a base type when a client API's boolean type is 71 | * an enum. Client APIs which use an integer or other type for 72 | * booleans cannot use this as the base type for their boolean. 73 | * 74 | * Tokens defined in khrplatform.h: 75 | * 76 | * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. 77 | * 78 | * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. 79 | * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. 80 | * 81 | * Calling convention macros defined in this file: 82 | * KHRONOS_APICALL 83 | * KHRONOS_APIENTRY 84 | * KHRONOS_APIATTRIBUTES 85 | * 86 | * These may be used in function prototypes as: 87 | * 88 | * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( 89 | * int arg1, 90 | * int arg2) KHRONOS_APIATTRIBUTES; 91 | */ 92 | 93 | /*------------------------------------------------------------------------- 94 | * Definition of KHRONOS_APICALL 95 | *------------------------------------------------------------------------- 96 | * This precedes the return type of the function in the function prototype. 97 | */ 98 | #if defined(_WIN32) && !defined(__SCITECH_SNAP__) 99 | # define KHRONOS_APICALL __declspec(dllimport) 100 | #elif defined (__SYMBIAN32__) 101 | # define KHRONOS_APICALL IMPORT_C 102 | #elif defined(__ANDROID__) 103 | # define KHRONOS_APICALL __attribute__((visibility("default"))) 104 | #else 105 | # define KHRONOS_APICALL 106 | #endif 107 | 108 | /*------------------------------------------------------------------------- 109 | * Definition of KHRONOS_APIENTRY 110 | *------------------------------------------------------------------------- 111 | * This follows the return type of the function and precedes the function 112 | * name in the function prototype. 113 | */ 114 | #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) 115 | /* Win32 but not WinCE */ 116 | # define KHRONOS_APIENTRY __stdcall 117 | #else 118 | # define KHRONOS_APIENTRY 119 | #endif 120 | 121 | /*------------------------------------------------------------------------- 122 | * Definition of KHRONOS_APIATTRIBUTES 123 | *------------------------------------------------------------------------- 124 | * This follows the closing parenthesis of the function prototype arguments. 125 | */ 126 | #if defined (__ARMCC_2__) 127 | #define KHRONOS_APIATTRIBUTES __softfp 128 | #else 129 | #define KHRONOS_APIATTRIBUTES 130 | #endif 131 | 132 | /*------------------------------------------------------------------------- 133 | * basic type definitions 134 | *-----------------------------------------------------------------------*/ 135 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) 136 | 137 | 138 | /* 139 | * Using 140 | */ 141 | #include 142 | typedef int32_t khronos_int32_t; 143 | typedef uint32_t khronos_uint32_t; 144 | typedef int64_t khronos_int64_t; 145 | typedef uint64_t khronos_uint64_t; 146 | #define KHRONOS_SUPPORT_INT64 1 147 | #define KHRONOS_SUPPORT_FLOAT 1 148 | 149 | #elif defined(__VMS ) || defined(__sgi) 150 | 151 | /* 152 | * Using 153 | */ 154 | #include 155 | typedef int32_t khronos_int32_t; 156 | typedef uint32_t khronos_uint32_t; 157 | typedef int64_t khronos_int64_t; 158 | typedef uint64_t khronos_uint64_t; 159 | #define KHRONOS_SUPPORT_INT64 1 160 | #define KHRONOS_SUPPORT_FLOAT 1 161 | 162 | #elif defined(_WIN32) && !defined(__SCITECH_SNAP__) 163 | 164 | /* 165 | * Win32 166 | */ 167 | typedef __int32 khronos_int32_t; 168 | typedef unsigned __int32 khronos_uint32_t; 169 | typedef __int64 khronos_int64_t; 170 | typedef unsigned __int64 khronos_uint64_t; 171 | #define KHRONOS_SUPPORT_INT64 1 172 | #define KHRONOS_SUPPORT_FLOAT 1 173 | 174 | #elif defined(__sun__) || defined(__digital__) 175 | 176 | /* 177 | * Sun or Digital 178 | */ 179 | typedef int khronos_int32_t; 180 | typedef unsigned int khronos_uint32_t; 181 | #if defined(__arch64__) || defined(_LP64) 182 | typedef long int khronos_int64_t; 183 | typedef unsigned long int khronos_uint64_t; 184 | #else 185 | typedef long long int khronos_int64_t; 186 | typedef unsigned long long int khronos_uint64_t; 187 | #endif /* __arch64__ */ 188 | #define KHRONOS_SUPPORT_INT64 1 189 | #define KHRONOS_SUPPORT_FLOAT 1 190 | 191 | #elif 0 192 | 193 | /* 194 | * Hypothetical platform with no float or int64 support 195 | */ 196 | typedef int khronos_int32_t; 197 | typedef unsigned int khronos_uint32_t; 198 | #define KHRONOS_SUPPORT_INT64 0 199 | #define KHRONOS_SUPPORT_FLOAT 0 200 | 201 | #else 202 | 203 | /* 204 | * Generic fallback 205 | */ 206 | #include 207 | typedef int32_t khronos_int32_t; 208 | typedef uint32_t khronos_uint32_t; 209 | typedef int64_t khronos_int64_t; 210 | typedef uint64_t khronos_uint64_t; 211 | #define KHRONOS_SUPPORT_INT64 1 212 | #define KHRONOS_SUPPORT_FLOAT 1 213 | 214 | #endif 215 | 216 | 217 | /* 218 | * Types that are (so far) the same on all platforms 219 | */ 220 | typedef signed char khronos_int8_t; 221 | typedef unsigned char khronos_uint8_t; 222 | typedef signed short int khronos_int16_t; 223 | typedef unsigned short int khronos_uint16_t; 224 | 225 | /* 226 | * Types that differ between LLP64 and LP64 architectures - in LLP64, 227 | * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears 228 | * to be the only LLP64 architecture in current use. 229 | */ 230 | #ifdef _WIN64 231 | typedef signed long long int khronos_intptr_t; 232 | typedef unsigned long long int khronos_uintptr_t; 233 | typedef signed long long int khronos_ssize_t; 234 | typedef unsigned long long int khronos_usize_t; 235 | #else 236 | typedef signed long int khronos_intptr_t; 237 | typedef unsigned long int khronos_uintptr_t; 238 | typedef signed long int khronos_ssize_t; 239 | typedef unsigned long int khronos_usize_t; 240 | #endif 241 | 242 | #if KHRONOS_SUPPORT_FLOAT 243 | /* 244 | * Float type 245 | */ 246 | typedef float khronos_float_t; 247 | #endif 248 | 249 | #if KHRONOS_SUPPORT_INT64 250 | /* Time types 251 | * 252 | * These types can be used to represent a time interval in nanoseconds or 253 | * an absolute Unadjusted System Time. Unadjusted System Time is the number 254 | * of nanoseconds since some arbitrary system event (e.g. since the last 255 | * time the system booted). The Unadjusted System Time is an unsigned 256 | * 64 bit value that wraps back to 0 every 584 years. Time intervals 257 | * may be either signed or unsigned. 258 | */ 259 | typedef khronos_uint64_t khronos_utime_nanoseconds_t; 260 | typedef khronos_int64_t khronos_stime_nanoseconds_t; 261 | #endif 262 | 263 | /* 264 | * Dummy value used to pad enum types to 32 bits. 265 | */ 266 | #ifndef KHRONOS_MAX_ENUM 267 | #define KHRONOS_MAX_ENUM 0x7FFFFFFF 268 | #endif 269 | 270 | /* 271 | * Enumerated boolean type 272 | * 273 | * Values other than zero should be considered to be true. Therefore 274 | * comparisons should not be made against KHRONOS_TRUE. 275 | */ 276 | typedef enum { 277 | KHRONOS_FALSE = 0, 278 | KHRONOS_TRUE = 1, 279 | KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM 280 | } khronos_boolean_enum_t; 281 | 282 | #endif /* __khrplatform_h_ */ 283 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_gles/glplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __glplatform_h_ 2 | #define __glplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | /* Platform-specific types and definitions for OpenGL ES 1.X gl.h 21 | * 22 | * Adopters may modify khrplatform.h and this file to suit their platform. 23 | * Please contribute modifications back to Khronos as pull requests on the 24 | * public github repository: 25 | * https://github.com/KhronosGroup/OpenGL-Registry 26 | */ 27 | 28 | #include 29 | 30 | #ifndef GL_API 31 | #define GL_API KHRONOS_APICALL 32 | #endif 33 | 34 | #ifndef GL_APIENTRY 35 | #define GL_APIENTRY KHRONOS_APIENTRY 36 | #endif 37 | 38 | #endif /* __glplatform_h_ */ 39 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_gles2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 21 | * 22 | * Adopters may modify khrplatform.h and this file to suit their platform. 23 | * Please contribute modifications back to Khronos as pull requests on the 24 | * public github repository: 25 | * https://github.com/KhronosGroup/OpenGL-Registry 26 | */ 27 | 28 | #include 29 | 30 | #ifndef GL_APICALL 31 | #define GL_APICALL KHRONOS_APICALL 32 | #endif 33 | 34 | #ifndef GL_APIENTRY 35 | #define GL_APIENTRY KHRONOS_APIENTRY 36 | #endif 37 | 38 | #endif /* __gl2platform_h_ */ 39 | -------------------------------------------------------------------------------- /include/glatter/headers/khronos_gles3/gl3platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl3platform_h_ 2 | #define __gl3platform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | /* Platform-specific types and definitions for OpenGL ES 3.X gl3.h 21 | * 22 | * Adopters may modify khrplatform.h and this file to suit their platform. 23 | * Please contribute modifications back to Khronos as pull requests on the 24 | * public github repository: 25 | * https://github.com/KhronosGroup/OpenGL-Registry 26 | */ 27 | 28 | #include 29 | 30 | #ifndef GL_APICALL 31 | #define GL_APICALL KHRONOS_APICALL 32 | #endif 33 | 34 | #ifndef GL_APIENTRY 35 | #define GL_APIENTRY KHRONOS_APIENTRY 36 | #endif 37 | 38 | #endif /* __gl3platform_h_ */ 39 | -------------------------------------------------------------------------------- /include/glatter/headers/mesa_gl_basic/glx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mesa 3-D graphics library 3 | * 4 | * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a 7 | * copy of this software and associated documentation files (the "Software"), 8 | * to deal in the Software without restriction, including without limitation 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | * and/or sell copies of the Software, and to permit persons to whom the 11 | * Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | * OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | 26 | #ifndef GLX_H 27 | #define GLX_H 28 | 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | 35 | #if defined(USE_MGL_NAMESPACE) 36 | #include "glx_mangle.h" 37 | #endif 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | 45 | #define GLX_VERSION_1_1 1 46 | #define GLX_VERSION_1_2 1 47 | #define GLX_VERSION_1_3 1 48 | #define GLX_VERSION_1_4 1 49 | 50 | #define GLX_EXTENSION_NAME "GLX" 51 | 52 | 53 | 54 | /* 55 | * Tokens for glXChooseVisual and glXGetConfig: 56 | */ 57 | #define GLX_USE_GL 1 58 | #define GLX_BUFFER_SIZE 2 59 | #define GLX_LEVEL 3 60 | #define GLX_RGBA 4 61 | #define GLX_DOUBLEBUFFER 5 62 | #define GLX_STEREO 6 63 | #define GLX_AUX_BUFFERS 7 64 | #define GLX_RED_SIZE 8 65 | #define GLX_GREEN_SIZE 9 66 | #define GLX_BLUE_SIZE 10 67 | #define GLX_ALPHA_SIZE 11 68 | #define GLX_DEPTH_SIZE 12 69 | #define GLX_STENCIL_SIZE 13 70 | #define GLX_ACCUM_RED_SIZE 14 71 | #define GLX_ACCUM_GREEN_SIZE 15 72 | #define GLX_ACCUM_BLUE_SIZE 16 73 | #define GLX_ACCUM_ALPHA_SIZE 17 74 | 75 | 76 | /* 77 | * Error codes returned by glXGetConfig: 78 | */ 79 | #define GLX_BAD_SCREEN 1 80 | #define GLX_BAD_ATTRIBUTE 2 81 | #define GLX_NO_EXTENSION 3 82 | #define GLX_BAD_VISUAL 4 83 | #define GLX_BAD_CONTEXT 5 84 | #define GLX_BAD_VALUE 6 85 | #define GLX_BAD_ENUM 7 86 | 87 | 88 | /* 89 | * GLX 1.1 and later: 90 | */ 91 | #define GLX_VENDOR 1 92 | #define GLX_VERSION 2 93 | #define GLX_EXTENSIONS 3 94 | 95 | 96 | /* 97 | * GLX 1.3 and later: 98 | */ 99 | #define GLX_CONFIG_CAVEAT 0x20 100 | #define GLX_DONT_CARE 0xFFFFFFFF 101 | #define GLX_X_VISUAL_TYPE 0x22 102 | #define GLX_TRANSPARENT_TYPE 0x23 103 | #define GLX_TRANSPARENT_INDEX_VALUE 0x24 104 | #define GLX_TRANSPARENT_RED_VALUE 0x25 105 | #define GLX_TRANSPARENT_GREEN_VALUE 0x26 106 | #define GLX_TRANSPARENT_BLUE_VALUE 0x27 107 | #define GLX_TRANSPARENT_ALPHA_VALUE 0x28 108 | #define GLX_WINDOW_BIT 0x00000001 109 | #define GLX_PIXMAP_BIT 0x00000002 110 | #define GLX_PBUFFER_BIT 0x00000004 111 | #define GLX_AUX_BUFFERS_BIT 0x00000010 112 | #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 113 | #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 114 | #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 115 | #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 116 | #define GLX_DEPTH_BUFFER_BIT 0x00000020 117 | #define GLX_STENCIL_BUFFER_BIT 0x00000040 118 | #define GLX_ACCUM_BUFFER_BIT 0x00000080 119 | #define GLX_NONE 0x8000 120 | #define GLX_SLOW_CONFIG 0x8001 121 | #define GLX_TRUE_COLOR 0x8002 122 | #define GLX_DIRECT_COLOR 0x8003 123 | #define GLX_PSEUDO_COLOR 0x8004 124 | #define GLX_STATIC_COLOR 0x8005 125 | #define GLX_GRAY_SCALE 0x8006 126 | #define GLX_STATIC_GRAY 0x8007 127 | #define GLX_TRANSPARENT_RGB 0x8008 128 | #define GLX_TRANSPARENT_INDEX 0x8009 129 | #define GLX_VISUAL_ID 0x800B 130 | #define GLX_SCREEN 0x800C 131 | #define GLX_NON_CONFORMANT_CONFIG 0x800D 132 | #define GLX_DRAWABLE_TYPE 0x8010 133 | #define GLX_RENDER_TYPE 0x8011 134 | #define GLX_X_RENDERABLE 0x8012 135 | #define GLX_FBCONFIG_ID 0x8013 136 | #define GLX_RGBA_TYPE 0x8014 137 | #define GLX_COLOR_INDEX_TYPE 0x8015 138 | #define GLX_MAX_PBUFFER_WIDTH 0x8016 139 | #define GLX_MAX_PBUFFER_HEIGHT 0x8017 140 | #define GLX_MAX_PBUFFER_PIXELS 0x8018 141 | #define GLX_PRESERVED_CONTENTS 0x801B 142 | #define GLX_LARGEST_PBUFFER 0x801C 143 | #define GLX_WIDTH 0x801D 144 | #define GLX_HEIGHT 0x801E 145 | #define GLX_EVENT_MASK 0x801F 146 | #define GLX_DAMAGED 0x8020 147 | #define GLX_SAVED 0x8021 148 | #define GLX_WINDOW 0x8022 149 | #define GLX_PBUFFER 0x8023 150 | #define GLX_PBUFFER_HEIGHT 0x8040 151 | #define GLX_PBUFFER_WIDTH 0x8041 152 | #define GLX_RGBA_BIT 0x00000001 153 | #define GLX_COLOR_INDEX_BIT 0x00000002 154 | #define GLX_PBUFFER_CLOBBER_MASK 0x08000000 155 | 156 | 157 | /* 158 | * GLX 1.4 and later: 159 | */ 160 | #define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/ 161 | #define GLX_SAMPLES 0x186a1 /*100001*/ 162 | 163 | 164 | 165 | typedef struct __GLXcontextRec *GLXContext; 166 | typedef XID GLXPixmap; 167 | typedef XID GLXDrawable; 168 | /* GLX 1.3 and later */ 169 | typedef struct __GLXFBConfigRec *GLXFBConfig; 170 | typedef XID GLXFBConfigID; 171 | typedef XID GLXContextID; 172 | typedef XID GLXWindow; 173 | typedef XID GLXPbuffer; 174 | 175 | 176 | /* 177 | ** Events. 178 | ** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX 179 | ** event - this helps initialization if the server supports the pbuffer 180 | ** extension and the client doesn't. 181 | */ 182 | #define GLX_PbufferClobber 0 183 | #define GLX_BufferSwapComplete 1 184 | 185 | #define __GLX_NUMBER_EVENTS 17 186 | 187 | extern XVisualInfo* glXChooseVisual( Display *dpy, int screen, 188 | int *attribList ); 189 | 190 | extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis, 191 | GLXContext shareList, Bool direct ); 192 | 193 | extern void glXDestroyContext( Display *dpy, GLXContext ctx ); 194 | 195 | extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, 196 | GLXContext ctx); 197 | 198 | extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, 199 | unsigned long mask ); 200 | 201 | extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); 202 | 203 | extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual, 204 | Pixmap pixmap ); 205 | 206 | extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ); 207 | 208 | extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event ); 209 | 210 | extern Bool glXQueryVersion( Display *dpy, int *maj, int *min ); 211 | 212 | extern Bool glXIsDirect( Display *dpy, GLXContext ctx ); 213 | 214 | extern int glXGetConfig( Display *dpy, XVisualInfo *visual, 215 | int attrib, int *value ); 216 | 217 | extern GLXContext glXGetCurrentContext( void ); 218 | 219 | extern GLXDrawable glXGetCurrentDrawable( void ); 220 | 221 | extern void glXWaitGL( void ); 222 | 223 | extern void glXWaitX( void ); 224 | 225 | extern void glXUseXFont( Font font, int first, int count, int list ); 226 | 227 | 228 | 229 | /* GLX 1.1 and later */ 230 | extern const char *glXQueryExtensionsString( Display *dpy, int screen ); 231 | 232 | extern const char *glXQueryServerString( Display *dpy, int screen, int name ); 233 | 234 | extern const char *glXGetClientString( Display *dpy, int name ); 235 | 236 | 237 | /* GLX 1.2 and later */ 238 | extern Display *glXGetCurrentDisplay( void ); 239 | 240 | 241 | /* GLX 1.3 and later */ 242 | extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen, 243 | const int *attribList, int *nitems ); 244 | 245 | extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, 246 | int attribute, int *value ); 247 | 248 | extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen, 249 | int *nelements ); 250 | 251 | extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, 252 | GLXFBConfig config ); 253 | 254 | extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config, 255 | Window win, const int *attribList ); 256 | 257 | extern void glXDestroyWindow( Display *dpy, GLXWindow window ); 258 | 259 | extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config, 260 | Pixmap pixmap, const int *attribList ); 261 | 262 | extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); 263 | 264 | extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config, 265 | const int *attribList ); 266 | 267 | extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); 268 | 269 | extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, 270 | unsigned int *value ); 271 | 272 | extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, 273 | int renderType, GLXContext shareList, 274 | Bool direct ); 275 | 276 | extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw, 277 | GLXDrawable read, GLXContext ctx ); 278 | 279 | extern GLXDrawable glXGetCurrentReadDrawable( void ); 280 | 281 | extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute, 282 | int *value ); 283 | 284 | extern void glXSelectEvent( Display *dpy, GLXDrawable drawable, 285 | unsigned long mask ); 286 | 287 | extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, 288 | unsigned long *mask ); 289 | 290 | /* GLX 1.3 function pointer typedefs */ 291 | typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); 292 | typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); 293 | typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); 294 | typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); 295 | typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); 296 | typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); 297 | typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); 298 | typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); 299 | typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); 300 | typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); 301 | typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); 302 | typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); 303 | typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); 304 | typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void); 305 | typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void); 306 | typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); 307 | typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); 308 | typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); 309 | 310 | 311 | /* 312 | * ARB 2. GLX_ARB_get_proc_address 313 | */ 314 | #ifndef GLX_ARB_get_proc_address 315 | #define GLX_ARB_get_proc_address 1 316 | 317 | typedef void (*__GLXextFuncPtr)(void); 318 | extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); 319 | 320 | #endif /* GLX_ARB_get_proc_address */ 321 | 322 | 323 | 324 | /* GLX 1.4 and later */ 325 | extern void (*glXGetProcAddress(const GLubyte *procname))( void ); 326 | 327 | /* GLX 1.4 function pointer typedefs */ 328 | typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); 329 | 330 | 331 | #ifndef GLX_GLXEXT_LEGACY 332 | 333 | #include 334 | 335 | #endif /* GLX_GLXEXT_LEGACY */ 336 | 337 | 338 | /** 339 | ** The following aren't in glxext.h yet. 340 | **/ 341 | 342 | 343 | /* 344 | * ???. GLX_NV_vertex_array_range 345 | */ 346 | #ifndef GLX_NV_vertex_array_range 347 | #define GLX_NV_vertex_array_range 348 | 349 | extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); 350 | extern void glXFreeMemoryNV(GLvoid *pointer); 351 | typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); 352 | typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); 353 | 354 | #endif /* GLX_NV_vertex_array_range */ 355 | 356 | 357 | /* 358 | * ARB ?. GLX_ARB_render_texture 359 | * XXX This was never finalized! 360 | */ 361 | #ifndef GLX_ARB_render_texture 362 | #define GLX_ARB_render_texture 1 363 | 364 | extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); 365 | extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); 366 | extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList); 367 | 368 | #endif /* GLX_ARB_render_texture */ 369 | 370 | 371 | /* 372 | * #?. GLX_MESA_swap_frame_usage 373 | */ 374 | #ifndef GLX_MESA_swap_frame_usage 375 | #define GLX_MESA_swap_frame_usage 1 376 | 377 | extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage); 378 | extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable); 379 | extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable); 380 | extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage); 381 | 382 | typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage); 383 | typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable); 384 | typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable); 385 | typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage); 386 | 387 | #endif /* GLX_MESA_swap_frame_usage */ 388 | 389 | 390 | 391 | /* 392 | * #?. GLX_MESA_swap_control 393 | */ 394 | #ifndef GLX_MESA_swap_control 395 | #define GLX_MESA_swap_control 1 396 | 397 | extern int glXSwapIntervalMESA(unsigned int interval); 398 | extern int glXGetSwapIntervalMESA(void); 399 | 400 | typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval); 401 | typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void); 402 | 403 | #endif /* GLX_MESA_swap_control */ 404 | 405 | 406 | /*** Should these go here, or in another header? */ 407 | /* 408 | ** GLX Events 409 | */ 410 | typedef struct { 411 | int event_type; /* GLX_DAMAGED or GLX_SAVED */ 412 | int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ 413 | unsigned long serial; /* # of last request processed by server */ 414 | Bool send_event; /* true if this came for SendEvent request */ 415 | Display *display; /* display the event was read from */ 416 | GLXDrawable drawable; /* XID of Drawable */ 417 | unsigned int buffer_mask; /* mask indicating which buffers are affected */ 418 | unsigned int aux_buffer; /* which aux buffer was affected */ 419 | int x, y; 420 | int width, height; 421 | int count; /* if nonzero, at least this many more */ 422 | } GLXPbufferClobberEvent; 423 | 424 | typedef struct { 425 | int type; 426 | unsigned long serial; /* # of last request processed by server */ 427 | Bool send_event; /* true if this came from a SendEvent request */ 428 | Display *display; /* Display the event was read from */ 429 | Drawable drawable; /* drawable on which event was requested in event mask */ 430 | int event_type; 431 | int64_t ust; 432 | int64_t msc; 433 | int64_t sbc; 434 | } GLXBufferSwapComplete; 435 | 436 | typedef union __GLXEvent { 437 | GLXPbufferClobberEvent glxpbufferclobber; 438 | GLXBufferSwapComplete glxbufferswapcomplete; 439 | long pad[24]; 440 | } GLXEvent; 441 | 442 | #ifdef __cplusplus 443 | } 444 | #endif 445 | 446 | #endif 447 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_egl_gles_1_1/glatter_GL_ges_decl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | 31 | #ifdef _MSC_VER 32 | #pragma warning(push) 33 | #pragma warning(disable : 4201) 34 | #endif 35 | 36 | typedef struct glatter_extension_support_status_GL 37 | { 38 | int has_GL_AMD_compressed_3DC_texture; 39 | int has_GL_AMD_compressed_ATC_texture; 40 | int has_GL_APPLE_copy_texture_levels; 41 | int has_GL_APPLE_framebuffer_multisample; 42 | int has_GL_APPLE_sync; 43 | int has_GL_APPLE_texture_2D_limited_npot; 44 | int has_GL_APPLE_texture_format_BGRA8888; 45 | int has_GL_APPLE_texture_max_level; 46 | int has_GL_ARM_rgba8; 47 | int has_GL_EXT_blend_minmax; 48 | int has_GL_EXT_debug_marker; 49 | int has_GL_EXT_discard_framebuffer; 50 | int has_GL_EXT_map_buffer_range; 51 | int has_GL_EXT_multi_draw_arrays; 52 | int has_GL_EXT_multisampled_render_to_texture; 53 | int has_GL_EXT_read_format_bgra; 54 | int has_GL_EXT_robustness; 55 | int has_GL_EXT_sRGB; 56 | int has_GL_EXT_texture_compression_dxt1; 57 | int has_GL_EXT_texture_filter_anisotropic; 58 | int has_GL_EXT_texture_format_BGRA8888; 59 | int has_GL_EXT_texture_lod_bias; 60 | int has_GL_EXT_texture_storage; 61 | int has_GL_IMG_multisampled_render_to_texture; 62 | int has_GL_IMG_read_format; 63 | int has_GL_IMG_texture_compression_pvrtc; 64 | int has_GL_IMG_texture_env_enhanced_fixed_function; 65 | int has_GL_IMG_user_clip_plane; 66 | int has_GL_KHR_debug; 67 | int has_GL_NV_fence; 68 | int has_GL_OES_EGL_image; 69 | int has_GL_OES_EGL_image_external; 70 | int has_GL_OES_blend_equation_separate; 71 | int has_GL_OES_blend_func_separate; 72 | int has_GL_OES_blend_subtract; 73 | int has_GL_OES_byte_coordinates; 74 | int has_GL_OES_compressed_ETC1_RGB8_sub_texture; 75 | int has_GL_OES_compressed_ETC1_RGB8_texture; 76 | int has_GL_OES_compressed_paletted_texture; 77 | int has_GL_OES_depth24; 78 | int has_GL_OES_depth32; 79 | int has_GL_OES_draw_texture; 80 | int has_GL_OES_element_index_uint; 81 | int has_GL_OES_extended_matrix_palette; 82 | int has_GL_OES_fbo_render_mipmap; 83 | int has_GL_OES_fixed_point; 84 | int has_GL_OES_framebuffer_object; 85 | int has_GL_OES_mapbuffer; 86 | int has_GL_OES_matrix_get; 87 | int has_GL_OES_matrix_palette; 88 | int has_GL_OES_packed_depth_stencil; 89 | int has_GL_OES_point_size_array; 90 | int has_GL_OES_point_sprite; 91 | int has_GL_OES_query_matrix; 92 | int has_GL_OES_read_format; 93 | int has_GL_OES_required_internalformat; 94 | int has_GL_OES_rgb8_rgba8; 95 | int has_GL_OES_single_precision; 96 | int has_GL_OES_stencil1; 97 | int has_GL_OES_stencil4; 98 | int has_GL_OES_stencil8; 99 | int has_GL_OES_stencil_wrap; 100 | int has_GL_OES_surfaceless_context; 101 | int has_GL_OES_texture_cube_map; 102 | int has_GL_OES_texture_env_crossbar; 103 | int has_GL_OES_texture_mirrored_repeat; 104 | int has_GL_OES_texture_npot; 105 | int has_GL_OES_vertex_array_object; 106 | int has_GL_QCOM_driver_control; 107 | int has_GL_QCOM_extended_get; 108 | int has_GL_QCOM_extended_get2; 109 | int has_GL_QCOM_perfmon_global_mode; 110 | int has_GL_QCOM_tiled_rendering; 111 | int has_GL_QCOM_writeonly_rendering; 112 | } glatter_extension_support_status_GL_t; 113 | 114 | 115 | #ifdef _MSC_VER 116 | #pragma warning(pop) 117 | #endif 118 | 119 | 120 | #define glatter_GL_AMD_compressed_3DC_texture glatter_get_extension_support_GL().has_GL_AMD_compressed_3DC_texture 121 | #define glatter_GL_AMD_compressed_ATC_texture glatter_get_extension_support_GL().has_GL_AMD_compressed_ATC_texture 122 | #define glatter_GL_APPLE_copy_texture_levels glatter_get_extension_support_GL().has_GL_APPLE_copy_texture_levels 123 | #define glatter_GL_APPLE_framebuffer_multisample glatter_get_extension_support_GL().has_GL_APPLE_framebuffer_multisample 124 | #define glatter_GL_APPLE_sync glatter_get_extension_support_GL().has_GL_APPLE_sync 125 | #define glatter_GL_APPLE_texture_2D_limited_npot glatter_get_extension_support_GL().has_GL_APPLE_texture_2D_limited_npot 126 | #define glatter_GL_APPLE_texture_format_BGRA8888 glatter_get_extension_support_GL().has_GL_APPLE_texture_format_BGRA8888 127 | #define glatter_GL_APPLE_texture_max_level glatter_get_extension_support_GL().has_GL_APPLE_texture_max_level 128 | #define glatter_GL_ARM_rgba8 glatter_get_extension_support_GL().has_GL_ARM_rgba8 129 | #define glatter_GL_EXT_blend_minmax glatter_get_extension_support_GL().has_GL_EXT_blend_minmax 130 | #define glatter_GL_EXT_debug_marker glatter_get_extension_support_GL().has_GL_EXT_debug_marker 131 | #define glatter_GL_EXT_discard_framebuffer glatter_get_extension_support_GL().has_GL_EXT_discard_framebuffer 132 | #define glatter_GL_EXT_map_buffer_range glatter_get_extension_support_GL().has_GL_EXT_map_buffer_range 133 | #define glatter_GL_EXT_multi_draw_arrays glatter_get_extension_support_GL().has_GL_EXT_multi_draw_arrays 134 | #define glatter_GL_EXT_multisampled_render_to_texture glatter_get_extension_support_GL().has_GL_EXT_multisampled_render_to_texture 135 | #define glatter_GL_EXT_read_format_bgra glatter_get_extension_support_GL().has_GL_EXT_read_format_bgra 136 | #define glatter_GL_EXT_robustness glatter_get_extension_support_GL().has_GL_EXT_robustness 137 | #define glatter_GL_EXT_sRGB glatter_get_extension_support_GL().has_GL_EXT_sRGB 138 | #define glatter_GL_EXT_texture_compression_dxt1 glatter_get_extension_support_GL().has_GL_EXT_texture_compression_dxt1 139 | #define glatter_GL_EXT_texture_filter_anisotropic glatter_get_extension_support_GL().has_GL_EXT_texture_filter_anisotropic 140 | #define glatter_GL_EXT_texture_format_BGRA8888 glatter_get_extension_support_GL().has_GL_EXT_texture_format_BGRA8888 141 | #define glatter_GL_EXT_texture_lod_bias glatter_get_extension_support_GL().has_GL_EXT_texture_lod_bias 142 | #define glatter_GL_EXT_texture_storage glatter_get_extension_support_GL().has_GL_EXT_texture_storage 143 | #define glatter_GL_IMG_multisampled_render_to_texture glatter_get_extension_support_GL().has_GL_IMG_multisampled_render_to_texture 144 | #define glatter_GL_IMG_read_format glatter_get_extension_support_GL().has_GL_IMG_read_format 145 | #define glatter_GL_IMG_texture_compression_pvrtc glatter_get_extension_support_GL().has_GL_IMG_texture_compression_pvrtc 146 | #define glatter_GL_IMG_texture_env_enhanced_fixed_function glatter_get_extension_support_GL().has_GL_IMG_texture_env_enhanced_fixed_function 147 | #define glatter_GL_IMG_user_clip_plane glatter_get_extension_support_GL().has_GL_IMG_user_clip_plane 148 | #define glatter_GL_KHR_debug glatter_get_extension_support_GL().has_GL_KHR_debug 149 | #define glatter_GL_NV_fence glatter_get_extension_support_GL().has_GL_NV_fence 150 | #define glatter_GL_OES_EGL_image glatter_get_extension_support_GL().has_GL_OES_EGL_image 151 | #define glatter_GL_OES_EGL_image_external glatter_get_extension_support_GL().has_GL_OES_EGL_image_external 152 | #define glatter_GL_OES_blend_equation_separate glatter_get_extension_support_GL().has_GL_OES_blend_equation_separate 153 | #define glatter_GL_OES_blend_func_separate glatter_get_extension_support_GL().has_GL_OES_blend_func_separate 154 | #define glatter_GL_OES_blend_subtract glatter_get_extension_support_GL().has_GL_OES_blend_subtract 155 | #define glatter_GL_OES_byte_coordinates glatter_get_extension_support_GL().has_GL_OES_byte_coordinates 156 | #define glatter_GL_OES_compressed_ETC1_RGB8_sub_texture glatter_get_extension_support_GL().has_GL_OES_compressed_ETC1_RGB8_sub_texture 157 | #define glatter_GL_OES_compressed_ETC1_RGB8_texture glatter_get_extension_support_GL().has_GL_OES_compressed_ETC1_RGB8_texture 158 | #define glatter_GL_OES_compressed_paletted_texture glatter_get_extension_support_GL().has_GL_OES_compressed_paletted_texture 159 | #define glatter_GL_OES_depth24 glatter_get_extension_support_GL().has_GL_OES_depth24 160 | #define glatter_GL_OES_depth32 glatter_get_extension_support_GL().has_GL_OES_depth32 161 | #define glatter_GL_OES_draw_texture glatter_get_extension_support_GL().has_GL_OES_draw_texture 162 | #define glatter_GL_OES_element_index_uint glatter_get_extension_support_GL().has_GL_OES_element_index_uint 163 | #define glatter_GL_OES_extended_matrix_palette glatter_get_extension_support_GL().has_GL_OES_extended_matrix_palette 164 | #define glatter_GL_OES_fbo_render_mipmap glatter_get_extension_support_GL().has_GL_OES_fbo_render_mipmap 165 | #define glatter_GL_OES_fixed_point glatter_get_extension_support_GL().has_GL_OES_fixed_point 166 | #define glatter_GL_OES_framebuffer_object glatter_get_extension_support_GL().has_GL_OES_framebuffer_object 167 | #define glatter_GL_OES_mapbuffer glatter_get_extension_support_GL().has_GL_OES_mapbuffer 168 | #define glatter_GL_OES_matrix_get glatter_get_extension_support_GL().has_GL_OES_matrix_get 169 | #define glatter_GL_OES_matrix_palette glatter_get_extension_support_GL().has_GL_OES_matrix_palette 170 | #define glatter_GL_OES_packed_depth_stencil glatter_get_extension_support_GL().has_GL_OES_packed_depth_stencil 171 | #define glatter_GL_OES_point_size_array glatter_get_extension_support_GL().has_GL_OES_point_size_array 172 | #define glatter_GL_OES_point_sprite glatter_get_extension_support_GL().has_GL_OES_point_sprite 173 | #define glatter_GL_OES_query_matrix glatter_get_extension_support_GL().has_GL_OES_query_matrix 174 | #define glatter_GL_OES_read_format glatter_get_extension_support_GL().has_GL_OES_read_format 175 | #define glatter_GL_OES_required_internalformat glatter_get_extension_support_GL().has_GL_OES_required_internalformat 176 | #define glatter_GL_OES_rgb8_rgba8 glatter_get_extension_support_GL().has_GL_OES_rgb8_rgba8 177 | #define glatter_GL_OES_single_precision glatter_get_extension_support_GL().has_GL_OES_single_precision 178 | #define glatter_GL_OES_stencil1 glatter_get_extension_support_GL().has_GL_OES_stencil1 179 | #define glatter_GL_OES_stencil4 glatter_get_extension_support_GL().has_GL_OES_stencil4 180 | #define glatter_GL_OES_stencil8 glatter_get_extension_support_GL().has_GL_OES_stencil8 181 | #define glatter_GL_OES_stencil_wrap glatter_get_extension_support_GL().has_GL_OES_stencil_wrap 182 | #define glatter_GL_OES_surfaceless_context glatter_get_extension_support_GL().has_GL_OES_surfaceless_context 183 | #define glatter_GL_OES_texture_cube_map glatter_get_extension_support_GL().has_GL_OES_texture_cube_map 184 | #define glatter_GL_OES_texture_env_crossbar glatter_get_extension_support_GL().has_GL_OES_texture_env_crossbar 185 | #define glatter_GL_OES_texture_mirrored_repeat glatter_get_extension_support_GL().has_GL_OES_texture_mirrored_repeat 186 | #define glatter_GL_OES_texture_npot glatter_get_extension_support_GL().has_GL_OES_texture_npot 187 | #define glatter_GL_OES_vertex_array_object glatter_get_extension_support_GL().has_GL_OES_vertex_array_object 188 | #define glatter_GL_QCOM_driver_control glatter_get_extension_support_GL().has_GL_QCOM_driver_control 189 | #define glatter_GL_QCOM_extended_get glatter_get_extension_support_GL().has_GL_QCOM_extended_get 190 | #define glatter_GL_QCOM_extended_get2 glatter_get_extension_support_GL().has_GL_QCOM_extended_get2 191 | #define glatter_GL_QCOM_perfmon_global_mode glatter_get_extension_support_GL().has_GL_QCOM_perfmon_global_mode 192 | #define glatter_GL_QCOM_tiled_rendering glatter_get_extension_support_GL().has_GL_QCOM_tiled_rendering 193 | #define glatter_GL_QCOM_writeonly_rendering glatter_get_extension_support_GL().has_GL_QCOM_writeonly_rendering 194 | 195 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_mesa_glx_gl/glatter_GLU_e2s_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | #ifdef _MSC_VER 31 | #pragma warning(push) 32 | #pragma warning(disable : 4702) 33 | #endif 34 | 35 | GLATTER_INLINE_OR_NOT 36 | const char* enum_to_string_GLU(GLenum e) 37 | { 38 | switch (e) { 39 | #if defined(__glu_h__) 40 | case 0x186a0: return "GLU_SMOOTH"; 41 | case 0x186a1: return "GLU_FLAT"; 42 | case 0x186a2: return "GLU_NONE"; 43 | case 0x186aa: return "GLU_POINT"; 44 | case 0x186ab: return "GLU_LINE"; 45 | case 0x186ac: return "GLU_FILL"; 46 | case 0x186ad: return "GLU_SILHOUETTE"; 47 | case 0x186b4: return "GLU_OUTSIDE"; 48 | case 0x186b5: return "GLU_INSIDE"; 49 | #endif 50 | case 0x18704: 51 | #if defined(__glu_h__) 52 | return "GLU_BEGIN"; 53 | #endif 54 | #if defined(__glu_h__) 55 | return "GLU_TESS_BEGIN"; 56 | #endif 57 | break; 58 | case 0x18705: 59 | #if defined(__glu_h__) 60 | return "GLU_TESS_VERTEX"; 61 | #endif 62 | #if defined(__glu_h__) 63 | return "GLU_VERTEX"; 64 | #endif 65 | break; 66 | case 0x18706: 67 | #if defined(__glu_h__) 68 | return "GLU_END"; 69 | #endif 70 | #if defined(__glu_h__) 71 | return "GLU_TESS_END"; 72 | #endif 73 | break; 74 | case 0x18707: 75 | #if defined(__glu_h__) 76 | return "GLU_ERROR"; 77 | #endif 78 | #if defined(__glu_h__) 79 | return "GLU_NURBS_ERROR"; 80 | #endif 81 | #if defined(__glu_h__) 82 | return "GLU_TESS_ERROR"; 83 | #endif 84 | break; 85 | case 0x18708: 86 | #if defined(__glu_h__) 87 | return "GLU_EDGE_FLAG"; 88 | #endif 89 | #if defined(__glu_h__) 90 | return "GLU_TESS_EDGE_FLAG"; 91 | #endif 92 | break; 93 | #if defined(__glu_h__) 94 | case 0x18709: return "GLU_TESS_COMBINE"; 95 | case 0x1870a: return "GLU_TESS_BEGIN_DATA"; 96 | case 0x1870b: return "GLU_TESS_VERTEX_DATA"; 97 | case 0x1870c: return "GLU_TESS_END_DATA"; 98 | case 0x1870d: return "GLU_TESS_ERROR_DATA"; 99 | case 0x1870e: return "GLU_TESS_EDGE_FLAG_DATA"; 100 | case 0x1870f: return "GLU_TESS_COMBINE_DATA"; 101 | case 0x18718: return "GLU_CW"; 102 | case 0x18719: return "GLU_CCW"; 103 | case 0x1871a: return "GLU_INTERIOR"; 104 | case 0x1871b: return "GLU_EXTERIOR"; 105 | case 0x1871c: return "GLU_UNKNOWN"; 106 | case 0x18722: return "GLU_TESS_WINDING_ODD"; 107 | case 0x18723: return "GLU_TESS_WINDING_NONZERO"; 108 | case 0x18724: return "GLU_TESS_WINDING_POSITIVE"; 109 | case 0x18725: return "GLU_TESS_WINDING_NEGATIVE"; 110 | case 0x18726: return "GLU_TESS_WINDING_ABS_GEQ_TWO"; 111 | case 0x1872c: return "GLU_TESS_WINDING_RULE"; 112 | case 0x1872d: return "GLU_TESS_BOUNDARY_ONLY"; 113 | case 0x1872e: return "GLU_TESS_TOLERANCE"; 114 | #endif 115 | case 0x18737: 116 | #if defined(__glu_h__) 117 | return "GLU_TESS_ERROR1"; 118 | #endif 119 | #if defined(__glu_h__) 120 | return "GLU_TESS_MISSING_BEGIN_POLYGON"; 121 | #endif 122 | break; 123 | case 0x18738: 124 | #if defined(__glu_h__) 125 | return "GLU_TESS_ERROR2"; 126 | #endif 127 | #if defined(__glu_h__) 128 | return "GLU_TESS_MISSING_BEGIN_CONTOUR"; 129 | #endif 130 | break; 131 | case 0x18739: 132 | #if defined(__glu_h__) 133 | return "GLU_TESS_ERROR3"; 134 | #endif 135 | #if defined(__glu_h__) 136 | return "GLU_TESS_MISSING_END_POLYGON"; 137 | #endif 138 | break; 139 | case 0x1873a: 140 | #if defined(__glu_h__) 141 | return "GLU_TESS_ERROR4"; 142 | #endif 143 | #if defined(__glu_h__) 144 | return "GLU_TESS_MISSING_END_CONTOUR"; 145 | #endif 146 | break; 147 | case 0x1873b: 148 | #if defined(__glu_h__) 149 | return "GLU_TESS_COORD_TOO_LARGE"; 150 | #endif 151 | #if defined(__glu_h__) 152 | return "GLU_TESS_ERROR5"; 153 | #endif 154 | break; 155 | case 0x1873c: 156 | #if defined(__glu_h__) 157 | return "GLU_TESS_ERROR6"; 158 | #endif 159 | #if defined(__glu_h__) 160 | return "GLU_TESS_NEED_COMBINE_CALLBACK"; 161 | #endif 162 | break; 163 | #if defined(__glu_h__) 164 | case 0x1873d: return "GLU_TESS_ERROR7"; 165 | case 0x1873e: return "GLU_TESS_ERROR8"; 166 | #endif 167 | case 0x18740: 168 | #if defined(__glu_h__) 169 | return "GLU_NURBS_MODE"; 170 | #endif 171 | #if defined(__glu_h__) 172 | return "GLU_NURBS_MODE_EXT"; 173 | #endif 174 | break; 175 | case 0x18741: 176 | #if defined(__glu_h__) 177 | return "GLU_NURBS_TESSELLATOR"; 178 | #endif 179 | #if defined(__glu_h__) 180 | return "GLU_NURBS_TESSELLATOR_EXT"; 181 | #endif 182 | break; 183 | case 0x18742: 184 | #if defined(__glu_h__) 185 | return "GLU_NURBS_RENDERER"; 186 | #endif 187 | #if defined(__glu_h__) 188 | return "GLU_NURBS_RENDERER_EXT"; 189 | #endif 190 | break; 191 | case 0x18744: 192 | #if defined(__glu_h__) 193 | return "GLU_NURBS_BEGIN"; 194 | #endif 195 | #if defined(__glu_h__) 196 | return "GLU_NURBS_BEGIN_EXT"; 197 | #endif 198 | break; 199 | case 0x18745: 200 | #if defined(__glu_h__) 201 | return "GLU_NURBS_VERTEX"; 202 | #endif 203 | #if defined(__glu_h__) 204 | return "GLU_NURBS_VERTEX_EXT"; 205 | #endif 206 | break; 207 | case 0x18746: 208 | #if defined(__glu_h__) 209 | return "GLU_NURBS_NORMAL"; 210 | #endif 211 | #if defined(__glu_h__) 212 | return "GLU_NURBS_NORMAL_EXT"; 213 | #endif 214 | break; 215 | case 0x18747: 216 | #if defined(__glu_h__) 217 | return "GLU_NURBS_COLOR"; 218 | #endif 219 | #if defined(__glu_h__) 220 | return "GLU_NURBS_COLOR_EXT"; 221 | #endif 222 | break; 223 | case 0x18748: 224 | #if defined(__glu_h__) 225 | return "GLU_NURBS_TEXTURE_COORD"; 226 | #endif 227 | #if defined(__glu_h__) 228 | return "GLU_NURBS_TEX_COORD_EXT"; 229 | #endif 230 | break; 231 | case 0x18749: 232 | #if defined(__glu_h__) 233 | return "GLU_NURBS_END"; 234 | #endif 235 | #if defined(__glu_h__) 236 | return "GLU_NURBS_END_EXT"; 237 | #endif 238 | break; 239 | case 0x1874a: 240 | #if defined(__glu_h__) 241 | return "GLU_NURBS_BEGIN_DATA"; 242 | #endif 243 | #if defined(__glu_h__) 244 | return "GLU_NURBS_BEGIN_DATA_EXT"; 245 | #endif 246 | break; 247 | case 0x1874b: 248 | #if defined(__glu_h__) 249 | return "GLU_NURBS_VERTEX_DATA"; 250 | #endif 251 | #if defined(__glu_h__) 252 | return "GLU_NURBS_VERTEX_DATA_EXT"; 253 | #endif 254 | break; 255 | case 0x1874c: 256 | #if defined(__glu_h__) 257 | return "GLU_NURBS_NORMAL_DATA"; 258 | #endif 259 | #if defined(__glu_h__) 260 | return "GLU_NURBS_NORMAL_DATA_EXT"; 261 | #endif 262 | break; 263 | case 0x1874d: 264 | #if defined(__glu_h__) 265 | return "GLU_NURBS_COLOR_DATA"; 266 | #endif 267 | #if defined(__glu_h__) 268 | return "GLU_NURBS_COLOR_DATA_EXT"; 269 | #endif 270 | break; 271 | case 0x1874e: 272 | #if defined(__glu_h__) 273 | return "GLU_NURBS_TEXTURE_COORD_DATA"; 274 | #endif 275 | #if defined(__glu_h__) 276 | return "GLU_NURBS_TEX_COORD_DATA_EXT"; 277 | #endif 278 | break; 279 | case 0x1874f: 280 | #if defined(__glu_h__) 281 | return "GLU_NURBS_END_DATA"; 282 | #endif 283 | #if defined(__glu_h__) 284 | return "GLU_NURBS_END_DATA_EXT"; 285 | #endif 286 | break; 287 | #if defined(__glu_h__) 288 | case 0x18768: return "GLU_AUTO_LOAD_MATRIX"; 289 | case 0x18769: return "GLU_CULLING"; 290 | case 0x1876a: return "GLU_PARAMETRIC_TOLERANCE"; 291 | case 0x1876b: return "GLU_SAMPLING_TOLERANCE"; 292 | case 0x1876c: return "GLU_DISPLAY_MODE"; 293 | case 0x1876d: return "GLU_SAMPLING_METHOD"; 294 | case 0x1876e: return "GLU_U_STEP"; 295 | case 0x1876f: return "GLU_V_STEP"; 296 | #endif 297 | case 0x18770: 298 | #if defined(__glu_h__) 299 | return "GLU_OBJECT_PARAMETRIC_ERROR"; 300 | #endif 301 | #if defined(__glu_h__) 302 | return "GLU_OBJECT_PARAMETRIC_ERROR_EXT"; 303 | #endif 304 | break; 305 | case 0x18771: 306 | #if defined(__glu_h__) 307 | return "GLU_OBJECT_PATH_LENGTH"; 308 | #endif 309 | #if defined(__glu_h__) 310 | return "GLU_OBJECT_PATH_LENGTH_EXT"; 311 | #endif 312 | break; 313 | #if defined(__glu_h__) 314 | case 0x18772: return "GLU_MAP1_TRIM_2"; 315 | case 0x18773: return "GLU_MAP1_TRIM_3"; 316 | case 0x18777: return "GLU_PATH_LENGTH"; 317 | case 0x18778: return "GLU_PARAMETRIC_ERROR"; 318 | case 0x18779: return "GLU_DOMAIN_DISTANCE"; 319 | case 0x18790: return "GLU_OUTLINE_POLYGON"; 320 | case 0x18791: return "GLU_OUTLINE_PATCH"; 321 | case 0x1879b: return "GLU_NURBS_ERROR1"; 322 | case 0x1879c: return "GLU_NURBS_ERROR2"; 323 | case 0x1879d: return "GLU_NURBS_ERROR3"; 324 | case 0x1879e: return "GLU_NURBS_ERROR4"; 325 | case 0x1879f: return "GLU_NURBS_ERROR5"; 326 | case 0x187a0: return "GLU_NURBS_ERROR6"; 327 | case 0x187a1: return "GLU_NURBS_ERROR7"; 328 | case 0x187a2: return "GLU_NURBS_ERROR8"; 329 | case 0x187a3: return "GLU_NURBS_ERROR9"; 330 | case 0x187a4: return "GLU_NURBS_ERROR10"; 331 | case 0x187a5: return "GLU_NURBS_ERROR11"; 332 | case 0x187a6: return "GLU_NURBS_ERROR12"; 333 | case 0x187a7: return "GLU_NURBS_ERROR13"; 334 | case 0x187a8: return "GLU_NURBS_ERROR14"; 335 | case 0x187a9: return "GLU_NURBS_ERROR15"; 336 | case 0x187aa: return "GLU_NURBS_ERROR16"; 337 | case 0x187ab: return "GLU_NURBS_ERROR17"; 338 | case 0x187ac: return "GLU_NURBS_ERROR18"; 339 | case 0x187ad: return "GLU_NURBS_ERROR19"; 340 | case 0x187ae: return "GLU_NURBS_ERROR20"; 341 | case 0x187af: return "GLU_NURBS_ERROR21"; 342 | case 0x187b0: return "GLU_NURBS_ERROR22"; 343 | case 0x187b1: return "GLU_NURBS_ERROR23"; 344 | case 0x187b2: return "GLU_NURBS_ERROR24"; 345 | case 0x187b3: return "GLU_NURBS_ERROR25"; 346 | case 0x187b4: return "GLU_NURBS_ERROR26"; 347 | case 0x187b5: return "GLU_NURBS_ERROR27"; 348 | case 0x187b6: return "GLU_NURBS_ERROR28"; 349 | case 0x187b7: return "GLU_NURBS_ERROR29"; 350 | case 0x187b8: return "GLU_NURBS_ERROR30"; 351 | case 0x187b9: return "GLU_NURBS_ERROR31"; 352 | case 0x187ba: return "GLU_NURBS_ERROR32"; 353 | case 0x187bb: return "GLU_NURBS_ERROR33"; 354 | case 0x187bc: return "GLU_NURBS_ERROR34"; 355 | case 0x187bd: return "GLU_NURBS_ERROR35"; 356 | case 0x187be: return "GLU_NURBS_ERROR36"; 357 | case 0x187bf: return "GLU_NURBS_ERROR37"; 358 | case 0x189c0: return "GLU_VERSION"; 359 | case 0x189c1: return "GLU_EXTENSIONS"; 360 | case 0x18a24: return "GLU_INVALID_ENUM"; 361 | case 0x18a25: return "GLU_INVALID_VALUE"; 362 | case 0x18a26: return "GLU_OUT_OF_MEMORY"; 363 | case 0x18a27: return "GLU_INCOMPATIBLE_GL_VERSION"; 364 | case 0x18a28: return "GLU_INVALID_OPERATION"; 365 | #endif 366 | } 367 | return ""; 368 | } 369 | 370 | #ifdef _MSC_VER 371 | #pragma warning(pop) 372 | #endif 373 | 374 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_mesa_glx_gl/glatter_GLU_r_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | #ifdef GLATTER_GLU 31 | #if defined(__glu_h__) 32 | #ifndef gluBeginCurve_defined 33 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluBeginCurve, (nurb), (GLUnurbs* nurb)) 34 | #define gluBeginCurve_defined 35 | #endif 36 | #ifndef gluBeginPolygon_defined 37 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluBeginPolygon, (tess), (GLUtesselator* tess)) 38 | #define gluBeginPolygon_defined 39 | #endif 40 | #ifndef gluBeginSurface_defined 41 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluBeginSurface, (nurb), (GLUnurbs* nurb)) 42 | #define gluBeginSurface_defined 43 | #endif 44 | #ifndef gluBeginTrim_defined 45 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluBeginTrim, (nurb), (GLUnurbs* nurb)) 46 | #define gluBeginTrim_defined 47 | #endif 48 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluBuild1DMipmapLevels, (target, internalFormat, width, format, type, level, base, max, data), (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data)) 49 | #define gluBuild1DMipmapLevels_defined 50 | #ifndef gluBuild1DMipmaps_defined 51 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluBuild1DMipmaps, (target, internalFormat, width, format, type, data), (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data)) 52 | #define gluBuild1DMipmaps_defined 53 | #endif 54 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluBuild2DMipmapLevels, (target, internalFormat, width, height, format, type, level, base, max, data), (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data)) 55 | #define gluBuild2DMipmapLevels_defined 56 | #ifndef gluBuild2DMipmaps_defined 57 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluBuild2DMipmaps, (target, internalFormat, width, height, format, type, data), (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data)) 58 | #define gluBuild2DMipmaps_defined 59 | #endif 60 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluBuild3DMipmapLevels, (target, internalFormat, width, height, depth, format, type, level, base, max, data), (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data)) 61 | #define gluBuild3DMipmapLevels_defined 62 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluBuild3DMipmaps, (target, internalFormat, width, height, depth, format, type, data), (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)) 63 | #define gluBuild3DMipmaps_defined 64 | GLATTER_FBLOCK(return, GLU, GLAPI, GLboolean, GLAPIENTRY, gluCheckExtension, (extName, extString), (const GLubyte *extName, const GLubyte *extString)) 65 | #define gluCheckExtension_defined 66 | #ifndef gluCylinder_defined 67 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluCylinder, (quad, base, top, height, slices, stacks), (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks)) 68 | #define gluCylinder_defined 69 | #endif 70 | #ifndef gluDeleteNurbsRenderer_defined 71 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluDeleteNurbsRenderer, (nurb), (GLUnurbs* nurb)) 72 | #define gluDeleteNurbsRenderer_defined 73 | #endif 74 | #ifndef gluDeleteQuadric_defined 75 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluDeleteQuadric, (quad), (GLUquadric* quad)) 76 | #define gluDeleteQuadric_defined 77 | #endif 78 | #ifndef gluDeleteTess_defined 79 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluDeleteTess, (tess), (GLUtesselator* tess)) 80 | #define gluDeleteTess_defined 81 | #endif 82 | #ifndef gluDisk_defined 83 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluDisk, (quad, inner, outer, slices, loops), (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops)) 84 | #define gluDisk_defined 85 | #endif 86 | #ifndef gluEndCurve_defined 87 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluEndCurve, (nurb), (GLUnurbs* nurb)) 88 | #define gluEndCurve_defined 89 | #endif 90 | #ifndef gluEndPolygon_defined 91 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluEndPolygon, (tess), (GLUtesselator* tess)) 92 | #define gluEndPolygon_defined 93 | #endif 94 | #ifndef gluEndSurface_defined 95 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluEndSurface, (nurb), (GLUnurbs* nurb)) 96 | #define gluEndSurface_defined 97 | #endif 98 | #ifndef gluEndTrim_defined 99 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluEndTrim, (nurb), (GLUnurbs* nurb)) 100 | #define gluEndTrim_defined 101 | #endif 102 | #ifndef gluErrorString_defined 103 | GLATTER_FBLOCK(return, GLU, GLAPI, const GLubyte *, GLAPIENTRY, gluErrorString, (error), (GLenum error)) 104 | #define gluErrorString_defined 105 | #endif 106 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluGetNurbsProperty, (nurb, property, data), (GLUnurbs* nurb, GLenum property, GLfloat* data)) 107 | #define gluGetNurbsProperty_defined 108 | #ifndef gluGetString_defined 109 | GLATTER_FBLOCK(return, GLU, GLAPI, const GLubyte *, GLAPIENTRY, gluGetString, (name), (GLenum name)) 110 | #define gluGetString_defined 111 | #endif 112 | #ifndef gluGetTessProperty_defined 113 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluGetTessProperty, (tess, which, data), (GLUtesselator* tess, GLenum which, GLdouble* data)) 114 | #define gluGetTessProperty_defined 115 | #endif 116 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluLoadSamplingMatrices, (nurb, model, perspective, view), (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view)) 117 | #define gluLoadSamplingMatrices_defined 118 | #ifndef gluLookAt_defined 119 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluLookAt, (eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ), (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ)) 120 | #define gluLookAt_defined 121 | #endif 122 | #ifndef gluNewNurbsRenderer_defined 123 | GLATTER_FBLOCK(return, GLU, GLAPI, GLUnurbs*, GLAPIENTRY, gluNewNurbsRenderer, (), (void)) 124 | #define gluNewNurbsRenderer_defined 125 | #endif 126 | #ifndef gluNewQuadric_defined 127 | GLATTER_FBLOCK(return, GLU, GLAPI, GLUquadric*, GLAPIENTRY, gluNewQuadric, (), (void)) 128 | #define gluNewQuadric_defined 129 | #endif 130 | #ifndef gluNewTess_defined 131 | GLATTER_FBLOCK(return, GLU, GLAPI, GLUtesselator*, GLAPIENTRY, gluNewTess, (), (void)) 132 | #define gluNewTess_defined 133 | #endif 134 | #ifndef gluNextContour_defined 135 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNextContour, (tess, type), (GLUtesselator* tess, GLenum type)) 136 | #define gluNextContour_defined 137 | #endif 138 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNurbsCallback, (nurb, which, CallBackFunc), (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc)) 139 | #define gluNurbsCallback_defined 140 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNurbsCallbackData, (nurb, userData), (GLUnurbs* nurb, GLvoid* userData)) 141 | #define gluNurbsCallbackData_defined 142 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNurbsCallbackDataEXT, (nurb, userData), (GLUnurbs* nurb, GLvoid* userData)) 143 | #define gluNurbsCallbackDataEXT_defined 144 | #ifndef gluNurbsCurve_defined 145 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNurbsCurve, (nurb, knotCount, knots, stride, control, order, type), (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type)) 146 | #define gluNurbsCurve_defined 147 | #endif 148 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNurbsProperty, (nurb, property, value), (GLUnurbs* nurb, GLenum property, GLfloat value)) 149 | #define gluNurbsProperty_defined 150 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluNurbsSurface, (nurb, sKnotCount, sKnots, tKnotCount, tKnots, sStride, tStride, control, sOrder, tOrder, type), (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type)) 151 | #define gluNurbsSurface_defined 152 | #ifndef gluOrtho2D_defined 153 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluOrtho2D, (left, right, bottom, top), (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)) 154 | #define gluOrtho2D_defined 155 | #endif 156 | #ifndef gluPartialDisk_defined 157 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluPartialDisk, (quad, inner, outer, slices, loops, start, sweep), (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep)) 158 | #define gluPartialDisk_defined 159 | #endif 160 | #ifndef gluPerspective_defined 161 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluPerspective, (fovy, aspect, zNear, zFar), (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)) 162 | #define gluPerspective_defined 163 | #endif 164 | #ifndef gluPickMatrix_defined 165 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluPickMatrix, (x, y, delX, delY, viewport), (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport)) 166 | #define gluPickMatrix_defined 167 | #endif 168 | #ifndef gluProject_defined 169 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluProject, (objX, objY, objZ, model, proj, view, winX, winY, winZ), (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ)) 170 | #define gluProject_defined 171 | #endif 172 | #ifndef gluPwlCurve_defined 173 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluPwlCurve, (nurb, count, data, stride, type), (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type)) 174 | #define gluPwlCurve_defined 175 | #endif 176 | #ifndef gluQuadricCallback_defined 177 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluQuadricCallback, (quad, which, CallBackFunc), (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc)) 178 | #define gluQuadricCallback_defined 179 | #endif 180 | #ifndef gluQuadricDrawStyle_defined 181 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluQuadricDrawStyle, (quad, draw), (GLUquadric* quad, GLenum draw)) 182 | #define gluQuadricDrawStyle_defined 183 | #endif 184 | #ifndef gluQuadricNormals_defined 185 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluQuadricNormals, (quad, normal), (GLUquadric* quad, GLenum normal)) 186 | #define gluQuadricNormals_defined 187 | #endif 188 | #ifndef gluQuadricOrientation_defined 189 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluQuadricOrientation, (quad, orientation), (GLUquadric* quad, GLenum orientation)) 190 | #define gluQuadricOrientation_defined 191 | #endif 192 | #ifndef gluQuadricTexture_defined 193 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluQuadricTexture, (quad, texture), (GLUquadric* quad, GLboolean texture)) 194 | #define gluQuadricTexture_defined 195 | #endif 196 | #ifndef gluScaleImage_defined 197 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluScaleImage, (format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut), (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut)) 198 | #define gluScaleImage_defined 199 | #endif 200 | #ifndef gluSphere_defined 201 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluSphere, (quad, radius, slices, stacks), (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks)) 202 | #define gluSphere_defined 203 | #endif 204 | #ifndef gluTessBeginContour_defined 205 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessBeginContour, (tess), (GLUtesselator* tess)) 206 | #define gluTessBeginContour_defined 207 | #endif 208 | #ifndef gluTessBeginPolygon_defined 209 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessBeginPolygon, (tess, data), (GLUtesselator* tess, GLvoid* data)) 210 | #define gluTessBeginPolygon_defined 211 | #endif 212 | #ifndef gluTessCallback_defined 213 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessCallback, (tess, which, CallBackFunc), (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc)) 214 | #define gluTessCallback_defined 215 | #endif 216 | #ifndef gluTessEndContour_defined 217 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessEndContour, (tess), (GLUtesselator* tess)) 218 | #define gluTessEndContour_defined 219 | #endif 220 | #ifndef gluTessEndPolygon_defined 221 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessEndPolygon, (tess), (GLUtesselator* tess)) 222 | #define gluTessEndPolygon_defined 223 | #endif 224 | #ifndef gluTessNormal_defined 225 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessNormal, (tess, valueX, valueY, valueZ), (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ)) 226 | #define gluTessNormal_defined 227 | #endif 228 | #ifndef gluTessProperty_defined 229 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessProperty, (tess, which, data), (GLUtesselator* tess, GLenum which, GLdouble data)) 230 | #define gluTessProperty_defined 231 | #endif 232 | #ifndef gluTessVertex_defined 233 | GLATTER_FBLOCK(, GLU, GLAPI, void, GLAPIENTRY, gluTessVertex, (tess, location, data), (GLUtesselator* tess, GLdouble *location, GLvoid* data)) 234 | #define gluTessVertex_defined 235 | #endif 236 | #ifndef gluUnProject_defined 237 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluUnProject, (winX, winY, winZ, model, proj, view, objX, objY, objZ), (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ)) 238 | #define gluUnProject_defined 239 | #endif 240 | GLATTER_FBLOCK(return, GLU, GLAPI, GLint, GLAPIENTRY, gluUnProject4, (winX, winY, winZ, clipW, model, proj, view, nearVal, farVal, objX, objY, objZ, objW), (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW)) 241 | #define gluUnProject4_defined 242 | #endif // defined(__glu_h__) 243 | #endif // GLATTER_GLU 244 | 245 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_mesa_glx_gl/glatter_GLX_ges_decl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | 31 | #ifdef _MSC_VER 32 | #pragma warning(push) 33 | #pragma warning(disable : 4201) 34 | #endif 35 | 36 | typedef struct glatter_extension_support_status_GLX 37 | { 38 | int has_GLX_3DFX_multisample; 39 | int has_GLX_AMD_gpu_association; 40 | int has_GLX_ARB_context_flush_control; 41 | int has_GLX_ARB_create_context; 42 | int has_GLX_ARB_create_context_no_error; 43 | int has_GLX_ARB_create_context_profile; 44 | int has_GLX_ARB_create_context_robustness; 45 | int has_GLX_ARB_fbconfig_float; 46 | int has_GLX_ARB_framebuffer_sRGB; 47 | int has_GLX_ARB_get_proc_address; 48 | int has_GLX_ARB_multisample; 49 | int has_GLX_ARB_render_texture; 50 | int has_GLX_ARB_robustness_application_isolation; 51 | int has_GLX_ARB_robustness_share_group_isolation; 52 | int has_GLX_ARB_vertex_buffer_object; 53 | int has_GLX_EXT_buffer_age; 54 | int has_GLX_EXT_create_context_es2_profile; 55 | int has_GLX_EXT_create_context_es_profile; 56 | int has_GLX_EXT_fbconfig_packed_float; 57 | int has_GLX_EXT_framebuffer_sRGB; 58 | int has_GLX_EXT_import_context; 59 | int has_GLX_EXT_libglvnd; 60 | int has_GLX_EXT_no_config_context; 61 | int has_GLX_EXT_stereo_tree; 62 | int has_GLX_EXT_swap_control; 63 | int has_GLX_EXT_swap_control_tear; 64 | int has_GLX_EXT_texture_from_pixmap; 65 | int has_GLX_EXT_visual_info; 66 | int has_GLX_EXT_visual_rating; 67 | int has_GLX_INTEL_swap_event; 68 | int has_GLX_MESA_agp_offset; 69 | int has_GLX_MESA_copy_sub_buffer; 70 | int has_GLX_MESA_pixmap_colormap; 71 | int has_GLX_MESA_query_renderer; 72 | int has_GLX_MESA_release_buffers; 73 | int has_GLX_MESA_set_3dfx_mode; 74 | int has_GLX_MESA_swap_control; 75 | int has_GLX_MESA_swap_frame_usage; 76 | int has_GLX_NV_copy_buffer; 77 | int has_GLX_NV_copy_image; 78 | int has_GLX_NV_delay_before_swap; 79 | int has_GLX_NV_float_buffer; 80 | int has_GLX_NV_multisample_coverage; 81 | int has_GLX_NV_present_video; 82 | int has_GLX_NV_robustness_video_memory_purge; 83 | int has_GLX_NV_swap_group; 84 | int has_GLX_NV_video_capture; 85 | int has_GLX_NV_video_out; 86 | int has_GLX_OML_swap_method; 87 | int has_GLX_OML_sync_control; 88 | int has_GLX_SGIS_blended_overlay; 89 | int has_GLX_SGIS_multisample; 90 | int has_GLX_SGIS_shared_multisample; 91 | int has_GLX_SGIX_dmbuffer; 92 | int has_GLX_SGIX_fbconfig; 93 | int has_GLX_SGIX_hyperpipe; 94 | int has_GLX_SGIX_pbuffer; 95 | int has_GLX_SGIX_swap_barrier; 96 | int has_GLX_SGIX_swap_group; 97 | int has_GLX_SGIX_video_resize; 98 | int has_GLX_SGIX_video_source; 99 | int has_GLX_SGIX_visual_select_group; 100 | int has_GLX_SGI_cushion; 101 | int has_GLX_SGI_make_current_read; 102 | int has_GLX_SGI_swap_control; 103 | int has_GLX_SGI_video_sync; 104 | int has_GLX_SUN_get_transparent_index; 105 | } glatter_extension_support_status_GLX_t; 106 | 107 | 108 | #ifdef _MSC_VER 109 | #pragma warning(pop) 110 | #endif 111 | 112 | 113 | #define glatter_GLX_3DFX_multisample glatter_get_extension_support_GLX().has_GLX_3DFX_multisample 114 | #define glatter_GLX_AMD_gpu_association glatter_get_extension_support_GLX().has_GLX_AMD_gpu_association 115 | #define glatter_GLX_ARB_context_flush_control glatter_get_extension_support_GLX().has_GLX_ARB_context_flush_control 116 | #define glatter_GLX_ARB_create_context glatter_get_extension_support_GLX().has_GLX_ARB_create_context 117 | #define glatter_GLX_ARB_create_context_no_error glatter_get_extension_support_GLX().has_GLX_ARB_create_context_no_error 118 | #define glatter_GLX_ARB_create_context_profile glatter_get_extension_support_GLX().has_GLX_ARB_create_context_profile 119 | #define glatter_GLX_ARB_create_context_robustness glatter_get_extension_support_GLX().has_GLX_ARB_create_context_robustness 120 | #define glatter_GLX_ARB_fbconfig_float glatter_get_extension_support_GLX().has_GLX_ARB_fbconfig_float 121 | #define glatter_GLX_ARB_framebuffer_sRGB glatter_get_extension_support_GLX().has_GLX_ARB_framebuffer_sRGB 122 | #define glatter_GLX_ARB_get_proc_address glatter_get_extension_support_GLX().has_GLX_ARB_get_proc_address 123 | #define glatter_GLX_ARB_multisample glatter_get_extension_support_GLX().has_GLX_ARB_multisample 124 | #define glatter_GLX_ARB_render_texture glatter_get_extension_support_GLX().has_GLX_ARB_render_texture 125 | #define glatter_GLX_ARB_robustness_application_isolation glatter_get_extension_support_GLX().has_GLX_ARB_robustness_application_isolation 126 | #define glatter_GLX_ARB_robustness_share_group_isolation glatter_get_extension_support_GLX().has_GLX_ARB_robustness_share_group_isolation 127 | #define glatter_GLX_ARB_vertex_buffer_object glatter_get_extension_support_GLX().has_GLX_ARB_vertex_buffer_object 128 | #define glatter_GLX_EXT_buffer_age glatter_get_extension_support_GLX().has_GLX_EXT_buffer_age 129 | #define glatter_GLX_EXT_create_context_es2_profile glatter_get_extension_support_GLX().has_GLX_EXT_create_context_es2_profile 130 | #define glatter_GLX_EXT_create_context_es_profile glatter_get_extension_support_GLX().has_GLX_EXT_create_context_es_profile 131 | #define glatter_GLX_EXT_fbconfig_packed_float glatter_get_extension_support_GLX().has_GLX_EXT_fbconfig_packed_float 132 | #define glatter_GLX_EXT_framebuffer_sRGB glatter_get_extension_support_GLX().has_GLX_EXT_framebuffer_sRGB 133 | #define glatter_GLX_EXT_import_context glatter_get_extension_support_GLX().has_GLX_EXT_import_context 134 | #define glatter_GLX_EXT_libglvnd glatter_get_extension_support_GLX().has_GLX_EXT_libglvnd 135 | #define glatter_GLX_EXT_no_config_context glatter_get_extension_support_GLX().has_GLX_EXT_no_config_context 136 | #define glatter_GLX_EXT_stereo_tree glatter_get_extension_support_GLX().has_GLX_EXT_stereo_tree 137 | #define glatter_GLX_EXT_swap_control glatter_get_extension_support_GLX().has_GLX_EXT_swap_control 138 | #define glatter_GLX_EXT_swap_control_tear glatter_get_extension_support_GLX().has_GLX_EXT_swap_control_tear 139 | #define glatter_GLX_EXT_texture_from_pixmap glatter_get_extension_support_GLX().has_GLX_EXT_texture_from_pixmap 140 | #define glatter_GLX_EXT_visual_info glatter_get_extension_support_GLX().has_GLX_EXT_visual_info 141 | #define glatter_GLX_EXT_visual_rating glatter_get_extension_support_GLX().has_GLX_EXT_visual_rating 142 | #define glatter_GLX_INTEL_swap_event glatter_get_extension_support_GLX().has_GLX_INTEL_swap_event 143 | #define glatter_GLX_MESA_agp_offset glatter_get_extension_support_GLX().has_GLX_MESA_agp_offset 144 | #define glatter_GLX_MESA_copy_sub_buffer glatter_get_extension_support_GLX().has_GLX_MESA_copy_sub_buffer 145 | #define glatter_GLX_MESA_pixmap_colormap glatter_get_extension_support_GLX().has_GLX_MESA_pixmap_colormap 146 | #define glatter_GLX_MESA_query_renderer glatter_get_extension_support_GLX().has_GLX_MESA_query_renderer 147 | #define glatter_GLX_MESA_release_buffers glatter_get_extension_support_GLX().has_GLX_MESA_release_buffers 148 | #define glatter_GLX_MESA_set_3dfx_mode glatter_get_extension_support_GLX().has_GLX_MESA_set_3dfx_mode 149 | #define glatter_GLX_MESA_swap_control glatter_get_extension_support_GLX().has_GLX_MESA_swap_control 150 | #define glatter_GLX_MESA_swap_frame_usage glatter_get_extension_support_GLX().has_GLX_MESA_swap_frame_usage 151 | #define glatter_GLX_NV_copy_buffer glatter_get_extension_support_GLX().has_GLX_NV_copy_buffer 152 | #define glatter_GLX_NV_copy_image glatter_get_extension_support_GLX().has_GLX_NV_copy_image 153 | #define glatter_GLX_NV_delay_before_swap glatter_get_extension_support_GLX().has_GLX_NV_delay_before_swap 154 | #define glatter_GLX_NV_float_buffer glatter_get_extension_support_GLX().has_GLX_NV_float_buffer 155 | #define glatter_GLX_NV_multisample_coverage glatter_get_extension_support_GLX().has_GLX_NV_multisample_coverage 156 | #define glatter_GLX_NV_present_video glatter_get_extension_support_GLX().has_GLX_NV_present_video 157 | #define glatter_GLX_NV_robustness_video_memory_purge glatter_get_extension_support_GLX().has_GLX_NV_robustness_video_memory_purge 158 | #define glatter_GLX_NV_swap_group glatter_get_extension_support_GLX().has_GLX_NV_swap_group 159 | #define glatter_GLX_NV_video_capture glatter_get_extension_support_GLX().has_GLX_NV_video_capture 160 | #define glatter_GLX_NV_video_out glatter_get_extension_support_GLX().has_GLX_NV_video_out 161 | #define glatter_GLX_OML_swap_method glatter_get_extension_support_GLX().has_GLX_OML_swap_method 162 | #define glatter_GLX_OML_sync_control glatter_get_extension_support_GLX().has_GLX_OML_sync_control 163 | #define glatter_GLX_SGIS_blended_overlay glatter_get_extension_support_GLX().has_GLX_SGIS_blended_overlay 164 | #define glatter_GLX_SGIS_multisample glatter_get_extension_support_GLX().has_GLX_SGIS_multisample 165 | #define glatter_GLX_SGIS_shared_multisample glatter_get_extension_support_GLX().has_GLX_SGIS_shared_multisample 166 | #define glatter_GLX_SGIX_dmbuffer glatter_get_extension_support_GLX().has_GLX_SGIX_dmbuffer 167 | #define glatter_GLX_SGIX_fbconfig glatter_get_extension_support_GLX().has_GLX_SGIX_fbconfig 168 | #define glatter_GLX_SGIX_hyperpipe glatter_get_extension_support_GLX().has_GLX_SGIX_hyperpipe 169 | #define glatter_GLX_SGIX_pbuffer glatter_get_extension_support_GLX().has_GLX_SGIX_pbuffer 170 | #define glatter_GLX_SGIX_swap_barrier glatter_get_extension_support_GLX().has_GLX_SGIX_swap_barrier 171 | #define glatter_GLX_SGIX_swap_group glatter_get_extension_support_GLX().has_GLX_SGIX_swap_group 172 | #define glatter_GLX_SGIX_video_resize glatter_get_extension_support_GLX().has_GLX_SGIX_video_resize 173 | #define glatter_GLX_SGIX_video_source glatter_get_extension_support_GLX().has_GLX_SGIX_video_source 174 | #define glatter_GLX_SGIX_visual_select_group glatter_get_extension_support_GLX().has_GLX_SGIX_visual_select_group 175 | #define glatter_GLX_SGI_cushion glatter_get_extension_support_GLX().has_GLX_SGI_cushion 176 | #define glatter_GLX_SGI_make_current_read glatter_get_extension_support_GLX().has_GLX_SGI_make_current_read 177 | #define glatter_GLX_SGI_swap_control glatter_get_extension_support_GLX().has_GLX_SGI_swap_control 178 | #define glatter_GLX_SGI_video_sync glatter_get_extension_support_GLX().has_GLX_SGI_video_sync 179 | #define glatter_GLX_SUN_get_transparent_index glatter_get_extension_support_GLX().has_GLX_SUN_get_transparent_index 180 | 181 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_windows_wgl_gl/glatter_GLU_d.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | #ifdef GLATTER_GLU 31 | #if defined(__glu_h__) 32 | #if defined(__GLU_H__) 33 | #ifndef gluBeginCurve 34 | #define gluBeginCurve(nobj) glatter_gluBeginCurve_debug((nobj), __FILE__, __LINE__) 35 | #endif 36 | GLATTER_INLINE_OR_NOT void glatter_gluBeginCurve_debug(GLUnurbs *nobj, const char* file, int line); 37 | #ifndef gluBeginPolygon 38 | #define gluBeginPolygon(tess) glatter_gluBeginPolygon_debug((tess), __FILE__, __LINE__) 39 | #endif 40 | GLATTER_INLINE_OR_NOT void glatter_gluBeginPolygon_debug(GLUtesselator *tess, const char* file, int line); 41 | #ifndef gluBeginSurface 42 | #define gluBeginSurface(nobj) glatter_gluBeginSurface_debug((nobj), __FILE__, __LINE__) 43 | #endif 44 | GLATTER_INLINE_OR_NOT void glatter_gluBeginSurface_debug(GLUnurbs *nobj, const char* file, int line); 45 | #ifndef gluBeginTrim 46 | #define gluBeginTrim(nobj) glatter_gluBeginTrim_debug((nobj), __FILE__, __LINE__) 47 | #endif 48 | GLATTER_INLINE_OR_NOT void glatter_gluBeginTrim_debug(GLUnurbs *nobj, const char* file, int line); 49 | #ifndef gluBuild1DMipmaps 50 | #define gluBuild1DMipmaps(target, components, width, format, type, data) glatter_gluBuild1DMipmaps_debug((target), (components), (width), (format), (type), (data), __FILE__, __LINE__) 51 | #endif 52 | GLATTER_INLINE_OR_NOT int glatter_gluBuild1DMipmaps_debug(GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data, const char* file, int line); 53 | #ifndef gluBuild2DMipmaps 54 | #define gluBuild2DMipmaps(target, components, width, height, format, type, data) glatter_gluBuild2DMipmaps_debug((target), (components), (width), (height), (format), (type), (data), __FILE__, __LINE__) 55 | #endif 56 | GLATTER_INLINE_OR_NOT int glatter_gluBuild2DMipmaps_debug(GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data, const char* file, int line); 57 | #ifndef gluCylinder 58 | #define gluCylinder(qobj, baseRadius, topRadius, height, slices, stacks) glatter_gluCylinder_debug((qobj), (baseRadius), (topRadius), (height), (slices), (stacks), __FILE__, __LINE__) 59 | #endif 60 | GLATTER_INLINE_OR_NOT void glatter_gluCylinder_debug(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks, const char* file, int line); 61 | #ifndef gluDeleteNurbsRenderer 62 | #define gluDeleteNurbsRenderer(nobj) glatter_gluDeleteNurbsRenderer_debug((nobj), __FILE__, __LINE__) 63 | #endif 64 | GLATTER_INLINE_OR_NOT void glatter_gluDeleteNurbsRenderer_debug(GLUnurbs *nobj, const char* file, int line); 65 | #ifndef gluDeleteQuadric 66 | #define gluDeleteQuadric(state) glatter_gluDeleteQuadric_debug((state), __FILE__, __LINE__) 67 | #endif 68 | GLATTER_INLINE_OR_NOT void glatter_gluDeleteQuadric_debug(GLUquadric *state, const char* file, int line); 69 | #ifndef gluDeleteTess 70 | #define gluDeleteTess(tess) glatter_gluDeleteTess_debug((tess), __FILE__, __LINE__) 71 | #endif 72 | GLATTER_INLINE_OR_NOT void glatter_gluDeleteTess_debug(GLUtesselator *tess, const char* file, int line); 73 | #ifndef gluDisk 74 | #define gluDisk(qobj, innerRadius, outerRadius, slices, loops) glatter_gluDisk_debug((qobj), (innerRadius), (outerRadius), (slices), (loops), __FILE__, __LINE__) 75 | #endif 76 | GLATTER_INLINE_OR_NOT void glatter_gluDisk_debug(GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, const char* file, int line); 77 | #ifndef gluEndCurve 78 | #define gluEndCurve(nobj) glatter_gluEndCurve_debug((nobj), __FILE__, __LINE__) 79 | #endif 80 | GLATTER_INLINE_OR_NOT void glatter_gluEndCurve_debug(GLUnurbs *nobj, const char* file, int line); 81 | #ifndef gluEndPolygon 82 | #define gluEndPolygon(tess) glatter_gluEndPolygon_debug((tess), __FILE__, __LINE__) 83 | #endif 84 | GLATTER_INLINE_OR_NOT void glatter_gluEndPolygon_debug(GLUtesselator *tess, const char* file, int line); 85 | #ifndef gluEndSurface 86 | #define gluEndSurface(nobj) glatter_gluEndSurface_debug((nobj), __FILE__, __LINE__) 87 | #endif 88 | GLATTER_INLINE_OR_NOT void glatter_gluEndSurface_debug(GLUnurbs *nobj, const char* file, int line); 89 | #ifndef gluEndTrim 90 | #define gluEndTrim(nobj) glatter_gluEndTrim_debug((nobj), __FILE__, __LINE__) 91 | #endif 92 | GLATTER_INLINE_OR_NOT void glatter_gluEndTrim_debug(GLUnurbs *nobj, const char* file, int line); 93 | #ifndef gluErrorString 94 | #define gluErrorString(errCode) glatter_gluErrorString_debug((errCode), __FILE__, __LINE__) 95 | #endif 96 | GLATTER_INLINE_OR_NOT const GLubyte* glatter_gluErrorString_debug(GLenum errCode, const char* file, int line); 97 | #ifndef gluErrorUnicodeStringEXT 98 | #define gluErrorUnicodeStringEXT(errCode) glatter_gluErrorUnicodeStringEXT_debug((errCode), __FILE__, __LINE__) 99 | #endif 100 | GLATTER_INLINE_OR_NOT const wchar_t* glatter_gluErrorUnicodeStringEXT_debug(GLenum errCode, const char* file, int line); 101 | #ifndef gluGetString 102 | #define gluGetString(name) glatter_gluGetString_debug((name), __FILE__, __LINE__) 103 | #endif 104 | GLATTER_INLINE_OR_NOT const GLubyte* glatter_gluGetString_debug(GLenum name, const char* file, int line); 105 | #ifndef gluGetTessProperty 106 | #define gluGetTessProperty(tess, which, value) glatter_gluGetTessProperty_debug((tess), (which), (value), __FILE__, __LINE__) 107 | #endif 108 | GLATTER_INLINE_OR_NOT void glatter_gluGetTessProperty_debug(GLUtesselator *tess, GLenum which, GLdouble *value, const char* file, int line); 109 | #ifndef gluLookAt 110 | #define gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz) glatter_gluLookAt_debug((eyex), (eyey), (eyez), (centerx), (centery), (centerz), (upx), (upy), (upz), __FILE__, __LINE__) 111 | #endif 112 | GLATTER_INLINE_OR_NOT void glatter_gluLookAt_debug(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz, const char* file, int line); 113 | #ifndef gluNewNurbsRenderer 114 | #define gluNewNurbsRenderer() glatter_gluNewNurbsRenderer_debug(__FILE__, __LINE__) 115 | #endif 116 | GLATTER_INLINE_OR_NOT GLUnurbs* glatter_gluNewNurbsRenderer_debug(const char* file, int line); 117 | #ifndef gluNewQuadric 118 | #define gluNewQuadric() glatter_gluNewQuadric_debug(__FILE__, __LINE__) 119 | #endif 120 | GLATTER_INLINE_OR_NOT GLUquadric* glatter_gluNewQuadric_debug(const char* file, int line); 121 | #ifndef gluNewTess 122 | #define gluNewTess() glatter_gluNewTess_debug(__FILE__, __LINE__) 123 | #endif 124 | GLATTER_INLINE_OR_NOT GLUtesselator* glatter_gluNewTess_debug(const char* file, int line); 125 | #ifndef gluNextContour 126 | #define gluNextContour(tess, type) glatter_gluNextContour_debug((tess), (type), __FILE__, __LINE__) 127 | #endif 128 | GLATTER_INLINE_OR_NOT void glatter_gluNextContour_debug(GLUtesselator *tess, GLenum type, const char* file, int line); 129 | #ifndef gluNurbsCurve 130 | #define gluNurbsCurve(nobj, nknots, knot, stride, ctlarray, order, type) glatter_gluNurbsCurve_debug((nobj), (nknots), (knot), (stride), (ctlarray), (order), (type), __FILE__, __LINE__) 131 | #endif 132 | GLATTER_INLINE_OR_NOT void glatter_gluNurbsCurve_debug(GLUnurbs *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type, const char* file, int line); 133 | #ifndef gluOrtho2D 134 | #define gluOrtho2D(left, right, bottom, top) glatter_gluOrtho2D_debug((left), (right), (bottom), (top), __FILE__, __LINE__) 135 | #endif 136 | GLATTER_INLINE_OR_NOT void glatter_gluOrtho2D_debug(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, const char* file, int line); 137 | #ifndef gluPartialDisk 138 | #define gluPartialDisk(qobj, innerRadius, outerRadius, slices, loops, startAngle, sweepAngle) glatter_gluPartialDisk_debug((qobj), (innerRadius), (outerRadius), (slices), (loops), (startAngle), (sweepAngle), __FILE__, __LINE__) 139 | #endif 140 | GLATTER_INLINE_OR_NOT void glatter_gluPartialDisk_debug(GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle, const char* file, int line); 141 | #ifndef gluPerspective 142 | #define gluPerspective(fovy, aspect, zNear, zFar) glatter_gluPerspective_debug((fovy), (aspect), (zNear), (zFar), __FILE__, __LINE__) 143 | #endif 144 | GLATTER_INLINE_OR_NOT void glatter_gluPerspective_debug(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar, const char* file, int line); 145 | #ifndef gluPickMatrix 146 | #define gluPickMatrix(x, y, width, height, viewport) glatter_gluPickMatrix_debug((x), (y), (width), (height), (viewport), __FILE__, __LINE__) 147 | #endif 148 | GLATTER_INLINE_OR_NOT void glatter_gluPickMatrix_debug(GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4], const char* file, int line); 149 | #ifndef gluProject 150 | #define gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz) glatter_gluProject_debug((objx), (objy), (objz), (modelMatrix), (projMatrix), (viewport), (winx), (winy), (winz), __FILE__, __LINE__) 151 | #endif 152 | GLATTER_INLINE_OR_NOT int glatter_gluProject_debug(GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz, const char* file, int line); 153 | #ifndef gluPwlCurve 154 | #define gluPwlCurve(nobj, count, array, stride, type) glatter_gluPwlCurve_debug((nobj), (count), (array), (stride), (type), __FILE__, __LINE__) 155 | #endif 156 | GLATTER_INLINE_OR_NOT void glatter_gluPwlCurve_debug(GLUnurbs *nobj, GLint count, GLfloat *array, GLint stride, GLenum type, const char* file, int line); 157 | #ifndef gluQuadricCallback 158 | #define gluQuadricCallback(qobj, which, fn) glatter_gluQuadricCallback_debug((qobj), (which), (fn), __FILE__, __LINE__) 159 | #endif 160 | GLATTER_INLINE_OR_NOT void glatter_gluQuadricCallback_debug(GLUquadric *qobj, GLenum which, void (CALLBACK* fn)(), const char* file, int line); 161 | #ifndef gluQuadricDrawStyle 162 | #define gluQuadricDrawStyle(quadObject, drawStyle) glatter_gluQuadricDrawStyle_debug((quadObject), (drawStyle), __FILE__, __LINE__) 163 | #endif 164 | GLATTER_INLINE_OR_NOT void glatter_gluQuadricDrawStyle_debug(GLUquadric *quadObject, GLenum drawStyle, const char* file, int line); 165 | #ifndef gluQuadricNormals 166 | #define gluQuadricNormals(quadObject, normals) glatter_gluQuadricNormals_debug((quadObject), (normals), __FILE__, __LINE__) 167 | #endif 168 | GLATTER_INLINE_OR_NOT void glatter_gluQuadricNormals_debug(GLUquadric *quadObject, GLenum normals, const char* file, int line); 169 | #ifndef gluQuadricOrientation 170 | #define gluQuadricOrientation(quadObject, orientation) glatter_gluQuadricOrientation_debug((quadObject), (orientation), __FILE__, __LINE__) 171 | #endif 172 | GLATTER_INLINE_OR_NOT void glatter_gluQuadricOrientation_debug(GLUquadric *quadObject, GLenum orientation, const char* file, int line); 173 | #ifndef gluQuadricTexture 174 | #define gluQuadricTexture(quadObject, textureCoords) glatter_gluQuadricTexture_debug((quadObject), (textureCoords), __FILE__, __LINE__) 175 | #endif 176 | GLATTER_INLINE_OR_NOT void glatter_gluQuadricTexture_debug(GLUquadric *quadObject, GLboolean textureCoords, const char* file, int line); 177 | #ifndef gluScaleImage 178 | #define gluScaleImage(format, widthin, heightin, typein, datain, widthout, heightout, typeout, dataout) glatter_gluScaleImage_debug((format), (widthin), (heightin), (typein), (datain), (widthout), (heightout), (typeout), (dataout), __FILE__, __LINE__) 179 | #endif 180 | GLATTER_INLINE_OR_NOT int glatter_gluScaleImage_debug(GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout, const char* file, int line); 181 | #ifndef gluSphere 182 | #define gluSphere(qobj, radius, slices, stacks) glatter_gluSphere_debug((qobj), (radius), (slices), (stacks), __FILE__, __LINE__) 183 | #endif 184 | GLATTER_INLINE_OR_NOT void glatter_gluSphere_debug(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks, const char* file, int line); 185 | #ifndef gluTessBeginContour 186 | #define gluTessBeginContour(tess) glatter_gluTessBeginContour_debug((tess), __FILE__, __LINE__) 187 | #endif 188 | GLATTER_INLINE_OR_NOT void glatter_gluTessBeginContour_debug(GLUtesselator *tess, const char* file, int line); 189 | #ifndef gluTessBeginPolygon 190 | #define gluTessBeginPolygon(tess, polygon_data) glatter_gluTessBeginPolygon_debug((tess), (polygon_data), __FILE__, __LINE__) 191 | #endif 192 | GLATTER_INLINE_OR_NOT void glatter_gluTessBeginPolygon_debug(GLUtesselator *tess, void *polygon_data, const char* file, int line); 193 | #ifndef gluTessCallback 194 | #define gluTessCallback(tess, which, fn) glatter_gluTessCallback_debug((tess), (which), (fn), __FILE__, __LINE__) 195 | #endif 196 | GLATTER_INLINE_OR_NOT void glatter_gluTessCallback_debug(GLUtesselator *tess, GLenum which, void (CALLBACK *fn)(), const char* file, int line); 197 | #ifndef gluTessEndContour 198 | #define gluTessEndContour(tess) glatter_gluTessEndContour_debug((tess), __FILE__, __LINE__) 199 | #endif 200 | GLATTER_INLINE_OR_NOT void glatter_gluTessEndContour_debug(GLUtesselator *tess, const char* file, int line); 201 | #ifndef gluTessEndPolygon 202 | #define gluTessEndPolygon(tess) glatter_gluTessEndPolygon_debug((tess), __FILE__, __LINE__) 203 | #endif 204 | GLATTER_INLINE_OR_NOT void glatter_gluTessEndPolygon_debug(GLUtesselator *tess, const char* file, int line); 205 | #ifndef gluTessNormal 206 | #define gluTessNormal(tess, x, y, z) glatter_gluTessNormal_debug((tess), (x), (y), (z), __FILE__, __LINE__) 207 | #endif 208 | GLATTER_INLINE_OR_NOT void glatter_gluTessNormal_debug(GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z, const char* file, int line); 209 | #ifndef gluTessProperty 210 | #define gluTessProperty(tess, which, value) glatter_gluTessProperty_debug((tess), (which), (value), __FILE__, __LINE__) 211 | #endif 212 | GLATTER_INLINE_OR_NOT void glatter_gluTessProperty_debug(GLUtesselator *tess, GLenum which, GLdouble value, const char* file, int line); 213 | #ifndef gluTessVertex 214 | #define gluTessVertex(tess, coords, data) glatter_gluTessVertex_debug((tess), (coords), (data), __FILE__, __LINE__) 215 | #endif 216 | GLATTER_INLINE_OR_NOT void glatter_gluTessVertex_debug(GLUtesselator *tess, GLdouble coords[3], void *data, const char* file, int line); 217 | #ifndef gluUnProject 218 | #define gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, objx, objy, objz) glatter_gluUnProject_debug((winx), (winy), (winz), (modelMatrix), (projMatrix), (viewport), (objx), (objy), (objz), __FILE__, __LINE__) 219 | #endif 220 | GLATTER_INLINE_OR_NOT int glatter_gluUnProject_debug(GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz, const char* file, int line); 221 | #endif // defined(__glu_h__) 222 | #endif // defined(__GLU_H__) 223 | #endif // GLATTER_GLU 224 | 225 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_windows_wgl_gl/glatter_GLU_e2s_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | #ifdef _MSC_VER 31 | #pragma warning(push) 32 | #pragma warning(disable : 4702) 33 | #endif 34 | 35 | GLATTER_INLINE_OR_NOT 36 | const char* enum_to_string_GLU(GLenum e) 37 | { 38 | switch (e) { 39 | #if defined(__GLU_H__) 40 | case 0x186a0: return "GLU_SMOOTH"; 41 | case 0x186a1: return "GLU_FLAT"; 42 | case 0x186a2: return "GLU_NONE"; 43 | case 0x186aa: return "GLU_POINT"; 44 | case 0x186ab: return "GLU_LINE"; 45 | case 0x186ac: return "GLU_FILL"; 46 | case 0x186ad: return "GLU_SILHOUETTE"; 47 | case 0x186b4: return "GLU_OUTSIDE"; 48 | case 0x186b5: return "GLU_INSIDE"; 49 | case 0x18704: return "GLU_TESS_BEGIN"; 50 | case 0x18705: return "GLU_TESS_VERTEX"; 51 | case 0x18706: return "GLU_TESS_END"; 52 | case 0x18707: return "GLU_TESS_ERROR"; 53 | case 0x18708: return "GLU_TESS_EDGE_FLAG"; 54 | case 0x18709: return "GLU_TESS_COMBINE"; 55 | case 0x1870a: return "GLU_TESS_BEGIN_DATA"; 56 | case 0x1870b: return "GLU_TESS_VERTEX_DATA"; 57 | case 0x1870c: return "GLU_TESS_END_DATA"; 58 | case 0x1870d: return "GLU_TESS_ERROR_DATA"; 59 | case 0x1870e: return "GLU_TESS_EDGE_FLAG_DATA"; 60 | case 0x1870f: return "GLU_TESS_COMBINE_DATA"; 61 | case 0x18718: return "GLU_CW"; 62 | case 0x18719: return "GLU_CCW"; 63 | case 0x1871a: return "GLU_INTERIOR"; 64 | case 0x1871b: return "GLU_EXTERIOR"; 65 | case 0x1871c: return "GLU_UNKNOWN"; 66 | case 0x18722: return "GLU_TESS_WINDING_ODD"; 67 | case 0x18723: return "GLU_TESS_WINDING_NONZERO"; 68 | case 0x18724: return "GLU_TESS_WINDING_POSITIVE"; 69 | case 0x18725: return "GLU_TESS_WINDING_NEGATIVE"; 70 | case 0x18726: return "GLU_TESS_WINDING_ABS_GEQ_TWO"; 71 | case 0x1872c: return "GLU_TESS_WINDING_RULE"; 72 | case 0x1872d: return "GLU_TESS_BOUNDARY_ONLY"; 73 | case 0x1872e: return "GLU_TESS_TOLERANCE"; 74 | case 0x18737: return "GLU_TESS_ERROR1"; 75 | case 0x18738: return "GLU_TESS_ERROR2"; 76 | case 0x18739: return "GLU_TESS_ERROR3"; 77 | case 0x1873a: return "GLU_TESS_ERROR4"; 78 | case 0x1873b: return "GLU_TESS_ERROR5"; 79 | case 0x1873c: return "GLU_TESS_ERROR6"; 80 | case 0x1873d: return "GLU_TESS_ERROR7"; 81 | case 0x1873e: return "GLU_TESS_ERROR8"; 82 | case 0x18768: return "GLU_AUTO_LOAD_MATRIX"; 83 | case 0x18769: return "GLU_CULLING"; 84 | case 0x1876a: return "GLU_PARAMETRIC_TOLERANCE"; 85 | case 0x1876b: return "GLU_SAMPLING_TOLERANCE"; 86 | case 0x1876c: return "GLU_DISPLAY_MODE"; 87 | case 0x1876d: return "GLU_SAMPLING_METHOD"; 88 | case 0x1876e: return "GLU_U_STEP"; 89 | case 0x1876f: return "GLU_V_STEP"; 90 | case 0x18772: return "GLU_MAP1_TRIM_2"; 91 | case 0x18773: return "GLU_MAP1_TRIM_3"; 92 | case 0x18777: return "GLU_PATH_LENGTH"; 93 | case 0x18778: return "GLU_PARAMETRIC_ERROR"; 94 | case 0x18779: return "GLU_DOMAIN_DISTANCE"; 95 | case 0x18790: return "GLU_OUTLINE_POLYGON"; 96 | case 0x18791: return "GLU_OUTLINE_PATCH"; 97 | case 0x1879b: return "GLU_NURBS_ERROR1"; 98 | case 0x1879c: return "GLU_NURBS_ERROR2"; 99 | case 0x1879d: return "GLU_NURBS_ERROR3"; 100 | case 0x1879e: return "GLU_NURBS_ERROR4"; 101 | case 0x1879f: return "GLU_NURBS_ERROR5"; 102 | case 0x187a0: return "GLU_NURBS_ERROR6"; 103 | case 0x187a1: return "GLU_NURBS_ERROR7"; 104 | case 0x187a2: return "GLU_NURBS_ERROR8"; 105 | case 0x187a3: return "GLU_NURBS_ERROR9"; 106 | case 0x187a4: return "GLU_NURBS_ERROR10"; 107 | case 0x187a5: return "GLU_NURBS_ERROR11"; 108 | case 0x187a6: return "GLU_NURBS_ERROR12"; 109 | case 0x187a7: return "GLU_NURBS_ERROR13"; 110 | case 0x187a8: return "GLU_NURBS_ERROR14"; 111 | case 0x187a9: return "GLU_NURBS_ERROR15"; 112 | case 0x187aa: return "GLU_NURBS_ERROR16"; 113 | case 0x187ab: return "GLU_NURBS_ERROR17"; 114 | case 0x187ac: return "GLU_NURBS_ERROR18"; 115 | case 0x187ad: return "GLU_NURBS_ERROR19"; 116 | case 0x187ae: return "GLU_NURBS_ERROR20"; 117 | case 0x187af: return "GLU_NURBS_ERROR21"; 118 | case 0x187b0: return "GLU_NURBS_ERROR22"; 119 | case 0x187b1: return "GLU_NURBS_ERROR23"; 120 | case 0x187b2: return "GLU_NURBS_ERROR24"; 121 | case 0x187b3: return "GLU_NURBS_ERROR25"; 122 | case 0x187b4: return "GLU_NURBS_ERROR26"; 123 | case 0x187b5: return "GLU_NURBS_ERROR27"; 124 | case 0x187b6: return "GLU_NURBS_ERROR28"; 125 | case 0x187b7: return "GLU_NURBS_ERROR29"; 126 | case 0x187b8: return "GLU_NURBS_ERROR30"; 127 | case 0x187b9: return "GLU_NURBS_ERROR31"; 128 | case 0x187ba: return "GLU_NURBS_ERROR32"; 129 | case 0x187bb: return "GLU_NURBS_ERROR33"; 130 | case 0x187bc: return "GLU_NURBS_ERROR34"; 131 | case 0x187bd: return "GLU_NURBS_ERROR35"; 132 | case 0x187be: return "GLU_NURBS_ERROR36"; 133 | case 0x187bf: return "GLU_NURBS_ERROR37"; 134 | case 0x189c0: return "GLU_VERSION"; 135 | case 0x189c1: return "GLU_EXTENSIONS"; 136 | case 0x18a24: return "GLU_INVALID_ENUM"; 137 | case 0x18a25: return "GLU_INVALID_VALUE"; 138 | case 0x18a26: return "GLU_OUT_OF_MEMORY"; 139 | case 0x18a27: return "GLU_INCOMPATIBLE_GL_VERSION"; 140 | #endif 141 | } 142 | return ""; 143 | } 144 | 145 | #ifdef _MSC_VER 146 | #pragma warning(pop) 147 | #endif 148 | 149 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_windows_wgl_gl/glatter_GLU_r.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | #ifdef GLATTER_GLU 31 | #if defined(__glu_h__) 32 | #if defined(__GLU_H__) 33 | #ifndef gluBeginCurve 34 | #define gluBeginCurve(nobj) glatter_gluBeginCurve((nobj)) 35 | #endif 36 | GLATTER_UBLOCK(void, APIENTRY, gluBeginCurve, (GLUnurbs *nobj)) 37 | #ifndef gluBeginPolygon 38 | #define gluBeginPolygon(tess) glatter_gluBeginPolygon((tess)) 39 | #endif 40 | GLATTER_UBLOCK(void, APIENTRY, gluBeginPolygon, (GLUtesselator *tess)) 41 | #ifndef gluBeginSurface 42 | #define gluBeginSurface(nobj) glatter_gluBeginSurface((nobj)) 43 | #endif 44 | GLATTER_UBLOCK(void, APIENTRY, gluBeginSurface, (GLUnurbs *nobj)) 45 | #ifndef gluBeginTrim 46 | #define gluBeginTrim(nobj) glatter_gluBeginTrim((nobj)) 47 | #endif 48 | GLATTER_UBLOCK(void, APIENTRY, gluBeginTrim, (GLUnurbs *nobj)) 49 | #ifndef gluBuild1DMipmaps 50 | #define gluBuild1DMipmaps(target, components, width, format, type, data) glatter_gluBuild1DMipmaps((target), (components), (width), (format), (type), (data)) 51 | #endif 52 | GLATTER_UBLOCK(int, APIENTRY, gluBuild1DMipmaps, (GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data)) 53 | #ifndef gluBuild2DMipmaps 54 | #define gluBuild2DMipmaps(target, components, width, height, format, type, data) glatter_gluBuild2DMipmaps((target), (components), (width), (height), (format), (type), (data)) 55 | #endif 56 | GLATTER_UBLOCK(int, APIENTRY, gluBuild2DMipmaps, (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data)) 57 | #ifndef gluCylinder 58 | #define gluCylinder(qobj, baseRadius, topRadius, height, slices, stacks) glatter_gluCylinder((qobj), (baseRadius), (topRadius), (height), (slices), (stacks)) 59 | #endif 60 | GLATTER_UBLOCK(void, APIENTRY, gluCylinder, (GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks)) 61 | #ifndef gluDeleteNurbsRenderer 62 | #define gluDeleteNurbsRenderer(nobj) glatter_gluDeleteNurbsRenderer((nobj)) 63 | #endif 64 | GLATTER_UBLOCK(void, APIENTRY, gluDeleteNurbsRenderer, (GLUnurbs *nobj)) 65 | #ifndef gluDeleteQuadric 66 | #define gluDeleteQuadric(state) glatter_gluDeleteQuadric((state)) 67 | #endif 68 | GLATTER_UBLOCK(void, APIENTRY, gluDeleteQuadric, (GLUquadric *state)) 69 | #ifndef gluDeleteTess 70 | #define gluDeleteTess(tess) glatter_gluDeleteTess((tess)) 71 | #endif 72 | GLATTER_UBLOCK(void, APIENTRY, gluDeleteTess, (GLUtesselator *tess)) 73 | #ifndef gluDisk 74 | #define gluDisk(qobj, innerRadius, outerRadius, slices, loops) glatter_gluDisk((qobj), (innerRadius), (outerRadius), (slices), (loops)) 75 | #endif 76 | GLATTER_UBLOCK(void, APIENTRY, gluDisk, (GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops)) 77 | #ifndef gluEndCurve 78 | #define gluEndCurve(nobj) glatter_gluEndCurve((nobj)) 79 | #endif 80 | GLATTER_UBLOCK(void, APIENTRY, gluEndCurve, (GLUnurbs *nobj)) 81 | #ifndef gluEndPolygon 82 | #define gluEndPolygon(tess) glatter_gluEndPolygon((tess)) 83 | #endif 84 | GLATTER_UBLOCK(void, APIENTRY, gluEndPolygon, (GLUtesselator *tess)) 85 | #ifndef gluEndSurface 86 | #define gluEndSurface(nobj) glatter_gluEndSurface((nobj)) 87 | #endif 88 | GLATTER_UBLOCK(void, APIENTRY, gluEndSurface, (GLUnurbs *nobj)) 89 | #ifndef gluEndTrim 90 | #define gluEndTrim(nobj) glatter_gluEndTrim((nobj)) 91 | #endif 92 | GLATTER_UBLOCK(void, APIENTRY, gluEndTrim, (GLUnurbs *nobj)) 93 | #ifndef gluErrorString 94 | #define gluErrorString(errCode) glatter_gluErrorString((errCode)) 95 | #endif 96 | GLATTER_UBLOCK(const GLubyte*, APIENTRY, gluErrorString, (GLenum errCode)) 97 | #ifndef gluErrorUnicodeStringEXT 98 | #define gluErrorUnicodeStringEXT(errCode) glatter_gluErrorUnicodeStringEXT((errCode)) 99 | #endif 100 | GLATTER_UBLOCK(const wchar_t*, APIENTRY, gluErrorUnicodeStringEXT, (GLenum errCode)) 101 | #ifndef gluGetString 102 | #define gluGetString(name) glatter_gluGetString((name)) 103 | #endif 104 | GLATTER_UBLOCK(const GLubyte*, APIENTRY, gluGetString, (GLenum name)) 105 | #ifndef gluGetTessProperty 106 | #define gluGetTessProperty(tess, which, value) glatter_gluGetTessProperty((tess), (which), (value)) 107 | #endif 108 | GLATTER_UBLOCK(void, APIENTRY, gluGetTessProperty, (GLUtesselator *tess, GLenum which, GLdouble *value)) 109 | #ifndef gluLookAt 110 | #define gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz) glatter_gluLookAt((eyex), (eyey), (eyez), (centerx), (centery), (centerz), (upx), (upy), (upz)) 111 | #endif 112 | GLATTER_UBLOCK(void, APIENTRY, gluLookAt, (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz)) 113 | #ifndef gluNewNurbsRenderer 114 | #define gluNewNurbsRenderer() glatter_gluNewNurbsRenderer() 115 | #endif 116 | GLATTER_UBLOCK(GLUnurbs*, APIENTRY, gluNewNurbsRenderer, (void)) 117 | #ifndef gluNewQuadric 118 | #define gluNewQuadric() glatter_gluNewQuadric() 119 | #endif 120 | GLATTER_UBLOCK(GLUquadric*, APIENTRY, gluNewQuadric, (void)) 121 | #ifndef gluNewTess 122 | #define gluNewTess() glatter_gluNewTess() 123 | #endif 124 | GLATTER_UBLOCK(GLUtesselator*, APIENTRY, gluNewTess, (void)) 125 | #ifndef gluNextContour 126 | #define gluNextContour(tess, type) glatter_gluNextContour((tess), (type)) 127 | #endif 128 | GLATTER_UBLOCK(void, APIENTRY, gluNextContour, (GLUtesselator *tess, GLenum type)) 129 | #ifndef gluNurbsCurve 130 | #define gluNurbsCurve(nobj, nknots, knot, stride, ctlarray, order, type) glatter_gluNurbsCurve((nobj), (nknots), (knot), (stride), (ctlarray), (order), (type)) 131 | #endif 132 | GLATTER_UBLOCK(void, APIENTRY, gluNurbsCurve, (GLUnurbs *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type)) 133 | #ifndef gluOrtho2D 134 | #define gluOrtho2D(left, right, bottom, top) glatter_gluOrtho2D((left), (right), (bottom), (top)) 135 | #endif 136 | GLATTER_UBLOCK(void, APIENTRY, gluOrtho2D, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)) 137 | #ifndef gluPartialDisk 138 | #define gluPartialDisk(qobj, innerRadius, outerRadius, slices, loops, startAngle, sweepAngle) glatter_gluPartialDisk((qobj), (innerRadius), (outerRadius), (slices), (loops), (startAngle), (sweepAngle)) 139 | #endif 140 | GLATTER_UBLOCK(void, APIENTRY, gluPartialDisk, (GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle)) 141 | #ifndef gluPerspective 142 | #define gluPerspective(fovy, aspect, zNear, zFar) glatter_gluPerspective((fovy), (aspect), (zNear), (zFar)) 143 | #endif 144 | GLATTER_UBLOCK(void, APIENTRY, gluPerspective, (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)) 145 | #ifndef gluPickMatrix 146 | #define gluPickMatrix(x, y, width, height, viewport) glatter_gluPickMatrix((x), (y), (width), (height), (viewport)) 147 | #endif 148 | GLATTER_UBLOCK(void, APIENTRY, gluPickMatrix, (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4])) 149 | #ifndef gluProject 150 | #define gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz) glatter_gluProject((objx), (objy), (objz), (modelMatrix), (projMatrix), (viewport), (winx), (winy), (winz)) 151 | #endif 152 | GLATTER_UBLOCK(int, APIENTRY, gluProject, (GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz)) 153 | #ifndef gluPwlCurve 154 | #define gluPwlCurve(nobj, count, array, stride, type) glatter_gluPwlCurve((nobj), (count), (array), (stride), (type)) 155 | #endif 156 | GLATTER_UBLOCK(void, APIENTRY, gluPwlCurve, (GLUnurbs *nobj, GLint count, GLfloat *array, GLint stride, GLenum type)) 157 | #ifndef gluQuadricCallback 158 | #define gluQuadricCallback(qobj, which, fn) glatter_gluQuadricCallback((qobj), (which), (fn)) 159 | #endif 160 | GLATTER_UBLOCK(void, APIENTRY, gluQuadricCallback, (GLUquadric *qobj, GLenum which, void (CALLBACK* fn)())) 161 | #ifndef gluQuadricDrawStyle 162 | #define gluQuadricDrawStyle(quadObject, drawStyle) glatter_gluQuadricDrawStyle((quadObject), (drawStyle)) 163 | #endif 164 | GLATTER_UBLOCK(void, APIENTRY, gluQuadricDrawStyle, (GLUquadric *quadObject, GLenum drawStyle)) 165 | #ifndef gluQuadricNormals 166 | #define gluQuadricNormals(quadObject, normals) glatter_gluQuadricNormals((quadObject), (normals)) 167 | #endif 168 | GLATTER_UBLOCK(void, APIENTRY, gluQuadricNormals, (GLUquadric *quadObject, GLenum normals)) 169 | #ifndef gluQuadricOrientation 170 | #define gluQuadricOrientation(quadObject, orientation) glatter_gluQuadricOrientation((quadObject), (orientation)) 171 | #endif 172 | GLATTER_UBLOCK(void, APIENTRY, gluQuadricOrientation, (GLUquadric *quadObject, GLenum orientation)) 173 | #ifndef gluQuadricTexture 174 | #define gluQuadricTexture(quadObject, textureCoords) glatter_gluQuadricTexture((quadObject), (textureCoords)) 175 | #endif 176 | GLATTER_UBLOCK(void, APIENTRY, gluQuadricTexture, (GLUquadric *quadObject, GLboolean textureCoords)) 177 | #ifndef gluScaleImage 178 | #define gluScaleImage(format, widthin, heightin, typein, datain, widthout, heightout, typeout, dataout) glatter_gluScaleImage((format), (widthin), (heightin), (typein), (datain), (widthout), (heightout), (typeout), (dataout)) 179 | #endif 180 | GLATTER_UBLOCK(int, APIENTRY, gluScaleImage, (GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout)) 181 | #ifndef gluSphere 182 | #define gluSphere(qobj, radius, slices, stacks) glatter_gluSphere((qobj), (radius), (slices), (stacks)) 183 | #endif 184 | GLATTER_UBLOCK(void, APIENTRY, gluSphere, (GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)) 185 | #ifndef gluTessBeginContour 186 | #define gluTessBeginContour(tess) glatter_gluTessBeginContour((tess)) 187 | #endif 188 | GLATTER_UBLOCK(void, APIENTRY, gluTessBeginContour, (GLUtesselator *tess)) 189 | #ifndef gluTessBeginPolygon 190 | #define gluTessBeginPolygon(tess, polygon_data) glatter_gluTessBeginPolygon((tess), (polygon_data)) 191 | #endif 192 | GLATTER_UBLOCK(void, APIENTRY, gluTessBeginPolygon, (GLUtesselator *tess, void *polygon_data)) 193 | #ifndef gluTessCallback 194 | #define gluTessCallback(tess, which, fn) glatter_gluTessCallback((tess), (which), (fn)) 195 | #endif 196 | GLATTER_UBLOCK(void, APIENTRY, gluTessCallback, (GLUtesselator *tess, GLenum which, void (CALLBACK *fn)())) 197 | #ifndef gluTessEndContour 198 | #define gluTessEndContour(tess) glatter_gluTessEndContour((tess)) 199 | #endif 200 | GLATTER_UBLOCK(void, APIENTRY, gluTessEndContour, (GLUtesselator *tess)) 201 | #ifndef gluTessEndPolygon 202 | #define gluTessEndPolygon(tess) glatter_gluTessEndPolygon((tess)) 203 | #endif 204 | GLATTER_UBLOCK(void, APIENTRY, gluTessEndPolygon, (GLUtesselator *tess)) 205 | #ifndef gluTessNormal 206 | #define gluTessNormal(tess, x, y, z) glatter_gluTessNormal((tess), (x), (y), (z)) 207 | #endif 208 | GLATTER_UBLOCK(void, APIENTRY, gluTessNormal, (GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z)) 209 | #ifndef gluTessProperty 210 | #define gluTessProperty(tess, which, value) glatter_gluTessProperty((tess), (which), (value)) 211 | #endif 212 | GLATTER_UBLOCK(void, APIENTRY, gluTessProperty, (GLUtesselator *tess, GLenum which, GLdouble value)) 213 | #ifndef gluTessVertex 214 | #define gluTessVertex(tess, coords, data) glatter_gluTessVertex((tess), (coords), (data)) 215 | #endif 216 | GLATTER_UBLOCK(void, APIENTRY, gluTessVertex, (GLUtesselator *tess, GLdouble coords[3], void *data)) 217 | #ifndef gluUnProject 218 | #define gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, objx, objy, objz) glatter_gluUnProject((winx), (winy), (winz), (modelMatrix), (projMatrix), (viewport), (objx), (objy), (objz)) 219 | #endif 220 | GLATTER_UBLOCK(int, APIENTRY, gluUnProject, (GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz)) 221 | #endif // defined(__glu_h__) 222 | #endif // defined(__GLU_H__) 223 | #endif // GLATTER_GLU 224 | 225 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_windows_wgl_gl/glatter_GLU_r_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | #ifdef GLATTER_GLU 31 | #if defined(__glu_h__) 32 | #if defined(__GLU_H__) 33 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluBeginCurve, (nobj), (GLUnurbs *nobj)) 34 | #define gluBeginCurve_defined 35 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluBeginPolygon, (tess), (GLUtesselator *tess)) 36 | #define gluBeginPolygon_defined 37 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluBeginSurface, (nobj), (GLUnurbs *nobj)) 38 | #define gluBeginSurface_defined 39 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluBeginTrim, (nobj), (GLUnurbs *nobj)) 40 | #define gluBeginTrim_defined 41 | GLATTER_FBLOCK(return, GLU, , int, APIENTRY, gluBuild1DMipmaps, (target, components, width, format, type, data), (GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data)) 42 | #define gluBuild1DMipmaps_defined 43 | GLATTER_FBLOCK(return, GLU, , int, APIENTRY, gluBuild2DMipmaps, (target, components, width, height, format, type, data), (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data)) 44 | #define gluBuild2DMipmaps_defined 45 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluCylinder, (qobj, baseRadius, topRadius, height, slices, stacks), (GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks)) 46 | #define gluCylinder_defined 47 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluDeleteNurbsRenderer, (nobj), (GLUnurbs *nobj)) 48 | #define gluDeleteNurbsRenderer_defined 49 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluDeleteQuadric, (state), (GLUquadric *state)) 50 | #define gluDeleteQuadric_defined 51 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluDeleteTess, (tess), (GLUtesselator *tess)) 52 | #define gluDeleteTess_defined 53 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluDisk, (qobj, innerRadius, outerRadius, slices, loops), (GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops)) 54 | #define gluDisk_defined 55 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluEndCurve, (nobj), (GLUnurbs *nobj)) 56 | #define gluEndCurve_defined 57 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluEndPolygon, (tess), (GLUtesselator *tess)) 58 | #define gluEndPolygon_defined 59 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluEndSurface, (nobj), (GLUnurbs *nobj)) 60 | #define gluEndSurface_defined 61 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluEndTrim, (nobj), (GLUnurbs *nobj)) 62 | #define gluEndTrim_defined 63 | GLATTER_FBLOCK(return, GLU, , const GLubyte*, APIENTRY, gluErrorString, (errCode), (GLenum errCode)) 64 | #define gluErrorString_defined 65 | GLATTER_FBLOCK(return, GLU, , const wchar_t*, APIENTRY, gluErrorUnicodeStringEXT, (errCode), (GLenum errCode)) 66 | #define gluErrorUnicodeStringEXT_defined 67 | GLATTER_FBLOCK(return, GLU, , const GLubyte*, APIENTRY, gluGetString, (name), (GLenum name)) 68 | #define gluGetString_defined 69 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluGetTessProperty, (tess, which, value), (GLUtesselator *tess, GLenum which, GLdouble *value)) 70 | #define gluGetTessProperty_defined 71 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluLookAt, (eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz), (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz)) 72 | #define gluLookAt_defined 73 | GLATTER_FBLOCK(return, GLU, , GLUnurbs*, APIENTRY, gluNewNurbsRenderer, (), (void)) 74 | #define gluNewNurbsRenderer_defined 75 | GLATTER_FBLOCK(return, GLU, , GLUquadric*, APIENTRY, gluNewQuadric, (), (void)) 76 | #define gluNewQuadric_defined 77 | GLATTER_FBLOCK(return, GLU, , GLUtesselator*, APIENTRY, gluNewTess, (), (void)) 78 | #define gluNewTess_defined 79 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluNextContour, (tess, type), (GLUtesselator *tess, GLenum type)) 80 | #define gluNextContour_defined 81 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluNurbsCurve, (nobj, nknots, knot, stride, ctlarray, order, type), (GLUnurbs *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type)) 82 | #define gluNurbsCurve_defined 83 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluOrtho2D, (left, right, bottom, top), (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)) 84 | #define gluOrtho2D_defined 85 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluPartialDisk, (qobj, innerRadius, outerRadius, slices, loops, startAngle, sweepAngle), (GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle)) 86 | #define gluPartialDisk_defined 87 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluPerspective, (fovy, aspect, zNear, zFar), (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)) 88 | #define gluPerspective_defined 89 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluPickMatrix, (x, y, width, height, viewport), (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4])) 90 | #define gluPickMatrix_defined 91 | GLATTER_FBLOCK(return, GLU, , int, APIENTRY, gluProject, (objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz), (GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz)) 92 | #define gluProject_defined 93 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluPwlCurve, (nobj, count, array, stride, type), (GLUnurbs *nobj, GLint count, GLfloat *array, GLint stride, GLenum type)) 94 | #define gluPwlCurve_defined 95 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluQuadricCallback, (qobj, which, fn), (GLUquadric *qobj, GLenum which, void (CALLBACK* fn)())) 96 | #define gluQuadricCallback_defined 97 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluQuadricDrawStyle, (quadObject, drawStyle), (GLUquadric *quadObject, GLenum drawStyle)) 98 | #define gluQuadricDrawStyle_defined 99 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluQuadricNormals, (quadObject, normals), (GLUquadric *quadObject, GLenum normals)) 100 | #define gluQuadricNormals_defined 101 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluQuadricOrientation, (quadObject, orientation), (GLUquadric *quadObject, GLenum orientation)) 102 | #define gluQuadricOrientation_defined 103 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluQuadricTexture, (quadObject, textureCoords), (GLUquadric *quadObject, GLboolean textureCoords)) 104 | #define gluQuadricTexture_defined 105 | GLATTER_FBLOCK(return, GLU, , int, APIENTRY, gluScaleImage, (format, widthin, heightin, typein, datain, widthout, heightout, typeout, dataout), (GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout)) 106 | #define gluScaleImage_defined 107 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluSphere, (qobj, radius, slices, stacks), (GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)) 108 | #define gluSphere_defined 109 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessBeginContour, (tess), (GLUtesselator *tess)) 110 | #define gluTessBeginContour_defined 111 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessBeginPolygon, (tess, polygon_data), (GLUtesselator *tess, void *polygon_data)) 112 | #define gluTessBeginPolygon_defined 113 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessCallback, (tess, which, fn), (GLUtesselator *tess, GLenum which, void (CALLBACK *fn)())) 114 | #define gluTessCallback_defined 115 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessEndContour, (tess), (GLUtesselator *tess)) 116 | #define gluTessEndContour_defined 117 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessEndPolygon, (tess), (GLUtesselator *tess)) 118 | #define gluTessEndPolygon_defined 119 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessNormal, (tess, x, y, z), (GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z)) 120 | #define gluTessNormal_defined 121 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessProperty, (tess, which, value), (GLUtesselator *tess, GLenum which, GLdouble value)) 122 | #define gluTessProperty_defined 123 | GLATTER_FBLOCK(, GLU, , void, APIENTRY, gluTessVertex, (tess, coords, data), (GLUtesselator *tess, GLdouble coords[3], void *data)) 124 | #define gluTessVertex_defined 125 | GLATTER_FBLOCK(return, GLU, , int, APIENTRY, gluUnProject, (winx, winy, winz, modelMatrix, projMatrix, viewport, objx, objy, objz), (GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz)) 126 | #define gluUnProject_defined 127 | #endif // defined(__glu_h__) 128 | #endif // defined(__GLU_H__) 129 | #endif // GLATTER_GLU 130 | 131 | -------------------------------------------------------------------------------- /include/glatter/platforms/glatter_windows_wgl_gl/glatter_WGL_ges_decl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Ioannis Makris 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | // This file was generated by glatter.py script. 27 | 28 | 29 | 30 | 31 | #ifdef _MSC_VER 32 | #pragma warning(push) 33 | #pragma warning(disable : 4201) 34 | #endif 35 | 36 | typedef struct glatter_extension_support_status_WGL 37 | { 38 | int has_WGL_3DFX_multisample; 39 | int has_WGL_3DL_stereo_control; 40 | int has_WGL_AMD_gpu_association; 41 | int has_WGL_ARB_buffer_region; 42 | int has_WGL_ARB_context_flush_control; 43 | int has_WGL_ARB_create_context; 44 | int has_WGL_ARB_create_context_no_error; 45 | int has_WGL_ARB_create_context_profile; 46 | int has_WGL_ARB_create_context_robustness; 47 | int has_WGL_ARB_extensions_string; 48 | int has_WGL_ARB_framebuffer_sRGB; 49 | int has_WGL_ARB_make_current_read; 50 | int has_WGL_ARB_multisample; 51 | int has_WGL_ARB_pbuffer; 52 | int has_WGL_ARB_pixel_format; 53 | int has_WGL_ARB_pixel_format_float; 54 | int has_WGL_ARB_render_texture; 55 | int has_WGL_ARB_robustness_application_isolation; 56 | int has_WGL_ARB_robustness_share_group_isolation; 57 | int has_WGL_ATI_pixel_format_float; 58 | int has_WGL_EXT_colorspace; 59 | int has_WGL_EXT_create_context_es2_profile; 60 | int has_WGL_EXT_create_context_es_profile; 61 | int has_WGL_EXT_depth_float; 62 | int has_WGL_EXT_display_color_table; 63 | int has_WGL_EXT_extensions_string; 64 | int has_WGL_EXT_framebuffer_sRGB; 65 | int has_WGL_EXT_make_current_read; 66 | int has_WGL_EXT_multisample; 67 | int has_WGL_EXT_pbuffer; 68 | int has_WGL_EXT_pixel_format; 69 | int has_WGL_EXT_pixel_format_packed_float; 70 | int has_WGL_EXT_swap_control; 71 | int has_WGL_EXT_swap_control_tear; 72 | int has_WGL_I3D_digital_video_control; 73 | int has_WGL_I3D_gamma; 74 | int has_WGL_I3D_genlock; 75 | int has_WGL_I3D_image_buffer; 76 | int has_WGL_I3D_swap_frame_lock; 77 | int has_WGL_I3D_swap_frame_usage; 78 | int has_WGL_NV_DX_interop; 79 | int has_WGL_NV_DX_interop2; 80 | int has_WGL_NV_copy_image; 81 | int has_WGL_NV_delay_before_swap; 82 | int has_WGL_NV_float_buffer; 83 | int has_WGL_NV_gpu_affinity; 84 | int has_WGL_NV_multisample_coverage; 85 | int has_WGL_NV_present_video; 86 | int has_WGL_NV_render_depth_texture; 87 | int has_WGL_NV_render_texture_rectangle; 88 | int has_WGL_NV_swap_group; 89 | int has_WGL_NV_vertex_array_range; 90 | int has_WGL_NV_video_capture; 91 | int has_WGL_NV_video_output; 92 | int has_WGL_OML_sync_control; 93 | } glatter_extension_support_status_WGL_t; 94 | 95 | 96 | #ifdef _MSC_VER 97 | #pragma warning(pop) 98 | #endif 99 | 100 | 101 | #define glatter_WGL_3DFX_multisample glatter_get_extension_support_WGL().has_WGL_3DFX_multisample 102 | #define glatter_WGL_3DL_stereo_control glatter_get_extension_support_WGL().has_WGL_3DL_stereo_control 103 | #define glatter_WGL_AMD_gpu_association glatter_get_extension_support_WGL().has_WGL_AMD_gpu_association 104 | #define glatter_WGL_ARB_buffer_region glatter_get_extension_support_WGL().has_WGL_ARB_buffer_region 105 | #define glatter_WGL_ARB_context_flush_control glatter_get_extension_support_WGL().has_WGL_ARB_context_flush_control 106 | #define glatter_WGL_ARB_create_context glatter_get_extension_support_WGL().has_WGL_ARB_create_context 107 | #define glatter_WGL_ARB_create_context_no_error glatter_get_extension_support_WGL().has_WGL_ARB_create_context_no_error 108 | #define glatter_WGL_ARB_create_context_profile glatter_get_extension_support_WGL().has_WGL_ARB_create_context_profile 109 | #define glatter_WGL_ARB_create_context_robustness glatter_get_extension_support_WGL().has_WGL_ARB_create_context_robustness 110 | #define glatter_WGL_ARB_extensions_string glatter_get_extension_support_WGL().has_WGL_ARB_extensions_string 111 | #define glatter_WGL_ARB_framebuffer_sRGB glatter_get_extension_support_WGL().has_WGL_ARB_framebuffer_sRGB 112 | #define glatter_WGL_ARB_make_current_read glatter_get_extension_support_WGL().has_WGL_ARB_make_current_read 113 | #define glatter_WGL_ARB_multisample glatter_get_extension_support_WGL().has_WGL_ARB_multisample 114 | #define glatter_WGL_ARB_pbuffer glatter_get_extension_support_WGL().has_WGL_ARB_pbuffer 115 | #define glatter_WGL_ARB_pixel_format glatter_get_extension_support_WGL().has_WGL_ARB_pixel_format 116 | #define glatter_WGL_ARB_pixel_format_float glatter_get_extension_support_WGL().has_WGL_ARB_pixel_format_float 117 | #define glatter_WGL_ARB_render_texture glatter_get_extension_support_WGL().has_WGL_ARB_render_texture 118 | #define glatter_WGL_ARB_robustness_application_isolation glatter_get_extension_support_WGL().has_WGL_ARB_robustness_application_isolation 119 | #define glatter_WGL_ARB_robustness_share_group_isolation glatter_get_extension_support_WGL().has_WGL_ARB_robustness_share_group_isolation 120 | #define glatter_WGL_ATI_pixel_format_float glatter_get_extension_support_WGL().has_WGL_ATI_pixel_format_float 121 | #define glatter_WGL_EXT_colorspace glatter_get_extension_support_WGL().has_WGL_EXT_colorspace 122 | #define glatter_WGL_EXT_create_context_es2_profile glatter_get_extension_support_WGL().has_WGL_EXT_create_context_es2_profile 123 | #define glatter_WGL_EXT_create_context_es_profile glatter_get_extension_support_WGL().has_WGL_EXT_create_context_es_profile 124 | #define glatter_WGL_EXT_depth_float glatter_get_extension_support_WGL().has_WGL_EXT_depth_float 125 | #define glatter_WGL_EXT_display_color_table glatter_get_extension_support_WGL().has_WGL_EXT_display_color_table 126 | #define glatter_WGL_EXT_extensions_string glatter_get_extension_support_WGL().has_WGL_EXT_extensions_string 127 | #define glatter_WGL_EXT_framebuffer_sRGB glatter_get_extension_support_WGL().has_WGL_EXT_framebuffer_sRGB 128 | #define glatter_WGL_EXT_make_current_read glatter_get_extension_support_WGL().has_WGL_EXT_make_current_read 129 | #define glatter_WGL_EXT_multisample glatter_get_extension_support_WGL().has_WGL_EXT_multisample 130 | #define glatter_WGL_EXT_pbuffer glatter_get_extension_support_WGL().has_WGL_EXT_pbuffer 131 | #define glatter_WGL_EXT_pixel_format glatter_get_extension_support_WGL().has_WGL_EXT_pixel_format 132 | #define glatter_WGL_EXT_pixel_format_packed_float glatter_get_extension_support_WGL().has_WGL_EXT_pixel_format_packed_float 133 | #define glatter_WGL_EXT_swap_control glatter_get_extension_support_WGL().has_WGL_EXT_swap_control 134 | #define glatter_WGL_EXT_swap_control_tear glatter_get_extension_support_WGL().has_WGL_EXT_swap_control_tear 135 | #define glatter_WGL_I3D_digital_video_control glatter_get_extension_support_WGL().has_WGL_I3D_digital_video_control 136 | #define glatter_WGL_I3D_gamma glatter_get_extension_support_WGL().has_WGL_I3D_gamma 137 | #define glatter_WGL_I3D_genlock glatter_get_extension_support_WGL().has_WGL_I3D_genlock 138 | #define glatter_WGL_I3D_image_buffer glatter_get_extension_support_WGL().has_WGL_I3D_image_buffer 139 | #define glatter_WGL_I3D_swap_frame_lock glatter_get_extension_support_WGL().has_WGL_I3D_swap_frame_lock 140 | #define glatter_WGL_I3D_swap_frame_usage glatter_get_extension_support_WGL().has_WGL_I3D_swap_frame_usage 141 | #define glatter_WGL_NV_DX_interop glatter_get_extension_support_WGL().has_WGL_NV_DX_interop 142 | #define glatter_WGL_NV_DX_interop2 glatter_get_extension_support_WGL().has_WGL_NV_DX_interop2 143 | #define glatter_WGL_NV_copy_image glatter_get_extension_support_WGL().has_WGL_NV_copy_image 144 | #define glatter_WGL_NV_delay_before_swap glatter_get_extension_support_WGL().has_WGL_NV_delay_before_swap 145 | #define glatter_WGL_NV_float_buffer glatter_get_extension_support_WGL().has_WGL_NV_float_buffer 146 | #define glatter_WGL_NV_gpu_affinity glatter_get_extension_support_WGL().has_WGL_NV_gpu_affinity 147 | #define glatter_WGL_NV_multisample_coverage glatter_get_extension_support_WGL().has_WGL_NV_multisample_coverage 148 | #define glatter_WGL_NV_present_video glatter_get_extension_support_WGL().has_WGL_NV_present_video 149 | #define glatter_WGL_NV_render_depth_texture glatter_get_extension_support_WGL().has_WGL_NV_render_depth_texture 150 | #define glatter_WGL_NV_render_texture_rectangle glatter_get_extension_support_WGL().has_WGL_NV_render_texture_rectangle 151 | #define glatter_WGL_NV_swap_group glatter_get_extension_support_WGL().has_WGL_NV_swap_group 152 | #define glatter_WGL_NV_vertex_array_range glatter_get_extension_support_WGL().has_WGL_NV_vertex_array_range 153 | #define glatter_WGL_NV_video_capture glatter_get_extension_support_WGL().has_WGL_NV_video_capture 154 | #define glatter_WGL_NV_video_output glatter_get_extension_support_WGL().has_WGL_NV_video_output 155 | #define glatter_WGL_OML_sync_control glatter_get_extension_support_WGL().has_WGL_OML_sync_control 156 | 157 | -------------------------------------------------------------------------------- /src/glatter/glatter.c: -------------------------------------------------------------------------------- 1 | #include --------------------------------------------------------------------------------