[76241] | 1 | /* $Id: DevVGA-SVGA3d-glLdr.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
| 2 | /** @file
|
---|
| 3 | * DevVGA - VMWare SVGA device - 3D part, dynamic loading of GL function.
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2018-2023 Oracle and/or its affiliates.
|
---|
[76241] | 8 | *
|
---|
[96407] | 9 | * This file is part of VirtualBox base platform packages, as
|
---|
| 10 | * available from https://www.virtualbox.org.
|
---|
| 11 | *
|
---|
| 12 | * This program is free software; you can redistribute it and/or
|
---|
| 13 | * modify it under the terms of the GNU General Public License
|
---|
| 14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | * License.
|
---|
| 16 | *
|
---|
| 17 | * This program is distributed in the hope that it will be useful, but
|
---|
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | * General Public License for more details.
|
---|
| 21 | *
|
---|
| 22 | * You should have received a copy of the GNU General Public License
|
---|
| 23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | *
|
---|
| 25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
[76241] | 26 | */
|
---|
| 27 |
|
---|
[76565] | 28 | #ifndef VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_glLdr_h
|
---|
| 29 | #define VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_glLdr_h
|
---|
[76520] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[76241] | 33 |
|
---|
| 34 | #ifndef VMSVGA3D_OPENGL
|
---|
| 35 | # error "This include file is for VMSVGA3D_OPENGL."
|
---|
| 36 | #endif
|
---|
| 37 |
|
---|
[76255] | 38 | #include <VBox/types.h>
|
---|
[76253] | 39 |
|
---|
[76245] | 40 | /** @todo VBOX_VMSVGA3D_GL_HACK_LEVEL is not necessary when dynamic loading is used. */
|
---|
| 41 |
|
---|
[76241] | 42 | #ifdef RT_OS_WINDOWS
|
---|
| 43 | # include <iprt/win/windows.h>
|
---|
| 44 | # include <GL/gl.h>
|
---|
| 45 | # include "vmsvga_glext/wglext.h"
|
---|
| 46 |
|
---|
| 47 | #elif defined(RT_OS_DARWIN)
|
---|
| 48 | # include <OpenGL/OpenGL.h>
|
---|
| 49 | # include <OpenGL/gl3.h>
|
---|
| 50 | # include <OpenGL/gl3ext.h>
|
---|
| 51 | # define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
|
---|
| 52 | # include <OpenGL/gl.h>
|
---|
| 53 | # include "DevVGA-SVGA3d-cocoa.h"
|
---|
| 54 | // HACK
|
---|
| 55 | typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
|
---|
| 56 | typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
|
---|
| 57 | typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
|
---|
| 58 | # define GL_RGBA_S3TC 0x83A2
|
---|
| 59 | # define GL_ALPHA8_EXT 0x803c
|
---|
| 60 | # define GL_LUMINANCE8_EXT 0x8040
|
---|
| 61 | # define GL_LUMINANCE16_EXT 0x8042
|
---|
| 62 | # define GL_LUMINANCE4_ALPHA4_EXT 0x8043
|
---|
| 63 | # define GL_LUMINANCE8_ALPHA8_EXT 0x8045
|
---|
| 64 | # define GL_INT_2_10_10_10_REV 0x8D9F
|
---|
| 65 |
|
---|
| 66 | #else
|
---|
| 67 | # include <X11/Xlib.h>
|
---|
| 68 | # include <X11/Xatom.h>
|
---|
| 69 | # include <GL/gl.h>
|
---|
| 70 | # include <GL/glx.h>
|
---|
| 71 | # define VBOX_VMSVGA3D_GL_HACK_LEVEL 0x103
|
---|
| 72 | #endif
|
---|
| 73 |
|
---|
[76315] | 74 | #ifndef __glext_h__
|
---|
| 75 | # undef GL_GLEXT_VERSION /** @todo r=bird: We include GL/glext.h above which also defines this and we'll end up with
|
---|
| 76 | * a clash if the system one does not use the same header guard as ours. So, I'm wondering
|
---|
| 77 | * whether this include is really needed, and if it is, whether we should use a unique header
|
---|
| 78 | * guard macro on it, so we'll have the same problems everywhere... */
|
---|
| 79 | #endif
|
---|
[76241] | 80 | #include "vmsvga_glext/glext.h"
|
---|
| 81 |
|
---|
| 82 |
|
---|
| 83 | #ifdef RT_OS_WINDOWS
|
---|
| 84 | # define GLAPIENTRY APIENTRY
|
---|
| 85 | #else
|
---|
[76245] | 86 | # define GLAPIENTRY
|
---|
[76241] | 87 | #endif
|
---|
| 88 |
|
---|
| 89 | #define GLAPIENTRYP GLAPIENTRY *
|
---|
| 90 |
|
---|
| 91 | #ifdef VMSVGA3D_GL_DEFINE_PFN
|
---|
| 92 | # define GLPFN
|
---|
| 93 | #else
|
---|
| 94 | # define GLPFN extern
|
---|
| 95 | #endif
|
---|
| 96 |
|
---|
[76255] | 97 | /** Load OpenGL library and initialize function pointers. */
|
---|
| 98 | int glLdrInit(PPDMDEVINS pDevIns);
|
---|
| 99 | /** Resolve an OpenGL function name. */
|
---|
[76253] | 100 | PFNRT glLdrGetProcAddress(const char *pszSymbol);
|
---|
[76255] | 101 | /** Get pointers to extension function. They are available on Windows only when OpenGL context is set. */
|
---|
| 102 | int glLdrGetExtFunctions(PPDMDEVINS pDevIns);
|
---|
[76241] | 103 |
|
---|
| 104 | /*
|
---|
| 105 | * All OpenGL function used by VMSVGA backend.
|
---|
| 106 | */
|
---|
| 107 |
|
---|
[76245] | 108 | /*
|
---|
| 109 | * GL 1.1 functions (exported from OpenGL32 on Windows).
|
---|
| 110 | */
|
---|
[76241] | 111 | GLPFN void (GLAPIENTRYP pfn_glAlphaFunc)(GLenum func, GLclampf ref);
|
---|
| 112 | #define glAlphaFunc pfn_glAlphaFunc
|
---|
| 113 |
|
---|
[84725] | 114 | GLPFN void (GLAPIENTRYP pfn_glBegin)(GLenum mode);
|
---|
| 115 | #define glBegin pfn_glBegin
|
---|
| 116 |
|
---|
[76241] | 117 | GLPFN void (GLAPIENTRYP pfn_glBindTexture)(GLenum target, GLuint texture);
|
---|
| 118 | #define glBindTexture pfn_glBindTexture
|
---|
| 119 |
|
---|
| 120 | GLPFN void (GLAPIENTRYP pfn_glBlendFunc)(GLenum sfactor, GLenum dfactor);
|
---|
| 121 | #define glBlendFunc pfn_glBlendFunc
|
---|
| 122 |
|
---|
| 123 | GLPFN void (GLAPIENTRYP pfn_glClear)(GLbitfield mask);
|
---|
| 124 | #define glClear pfn_glClear
|
---|
| 125 |
|
---|
| 126 | GLPFN void (GLAPIENTRYP pfn_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
---|
| 127 | #define glClearColor pfn_glClearColor
|
---|
| 128 |
|
---|
| 129 | GLPFN void (GLAPIENTRYP pfn_glClearDepth)(GLclampd depth);
|
---|
| 130 | #define glClearDepth pfn_glClearDepth
|
---|
| 131 |
|
---|
| 132 | GLPFN void (GLAPIENTRYP pfn_glClearStencil)(GLint s);
|
---|
| 133 | #define glClearStencil pfn_glClearStencil
|
---|
| 134 |
|
---|
| 135 | GLPFN void (GLAPIENTRYP pfn_glClipPlane)(GLenum plane, const GLdouble *equation);
|
---|
| 136 | #define glClipPlane pfn_glClipPlane
|
---|
| 137 |
|
---|
| 138 | GLPFN void (GLAPIENTRYP pfn_glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
---|
| 139 | #define glColorMask pfn_glColorMask
|
---|
| 140 |
|
---|
| 141 | GLPFN void (GLAPIENTRYP pfn_glColorPointer)(GLint size, GLenum type, GLsizei stride, const void *pointer);
|
---|
| 142 | #define glColorPointer pfn_glColorPointer
|
---|
| 143 |
|
---|
| 144 | GLPFN void (GLAPIENTRYP pfn_glCullFace)(GLenum mode);
|
---|
| 145 | #define glCullFace pfn_glCullFace
|
---|
| 146 |
|
---|
| 147 | GLPFN void (GLAPIENTRYP pfn_glDeleteTextures)(GLsizei n, const GLuint *textures);
|
---|
| 148 | #define glDeleteTextures pfn_glDeleteTextures
|
---|
| 149 |
|
---|
| 150 | GLPFN void (GLAPIENTRYP pfn_glDepthFunc)(GLenum func);
|
---|
| 151 | #define glDepthFunc pfn_glDepthFunc
|
---|
| 152 |
|
---|
| 153 | GLPFN void (GLAPIENTRYP pfn_glDepthMask)(GLboolean flag);
|
---|
| 154 | #define glDepthMask pfn_glDepthMask
|
---|
| 155 |
|
---|
| 156 | GLPFN void (GLAPIENTRYP pfn_glDepthRange)(GLclampd zNear, GLclampd zFar);
|
---|
| 157 | #define glDepthRange pfn_glDepthRange
|
---|
| 158 |
|
---|
| 159 | GLPFN void (GLAPIENTRYP pfn_glDisable)(GLenum cap);
|
---|
| 160 | #define glDisable pfn_glDisable
|
---|
| 161 |
|
---|
| 162 | GLPFN void (GLAPIENTRYP pfn_glDisableClientState)(GLenum array);
|
---|
| 163 | #define glDisableClientState pfn_glDisableClientState
|
---|
| 164 |
|
---|
| 165 | GLPFN void (GLAPIENTRYP pfn_glDrawArrays)(GLenum mode, GLint first, GLsizei count);
|
---|
| 166 | #define glDrawArrays pfn_glDrawArrays
|
---|
| 167 |
|
---|
| 168 | GLPFN void (GLAPIENTRYP pfn_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices);
|
---|
| 169 | #define glDrawElements pfn_glDrawElements
|
---|
| 170 |
|
---|
| 171 | GLPFN void (GLAPIENTRYP pfn_glEnable)(GLenum cap);
|
---|
| 172 | #define glEnable pfn_glEnable
|
---|
| 173 |
|
---|
| 174 | GLPFN void (GLAPIENTRYP pfn_glEnableClientState)(GLenum array);
|
---|
| 175 | #define glEnableClientState pfn_glEnableClientState
|
---|
| 176 |
|
---|
[84725] | 177 | GLPFN void (GLAPIENTRYP pfn_glEnd)(void);
|
---|
| 178 | #define glEnd pfn_glEnd
|
---|
| 179 |
|
---|
| 180 | GLPFN void (GLAPIENTRYP pfn_glFinish)(void);
|
---|
| 181 | #define glFinish pfn_glFinish
|
---|
| 182 |
|
---|
| 183 | GLPFN void (GLAPIENTRYP pfn_glFlush)(void);
|
---|
| 184 | #define glFlush pfn_glFlush
|
---|
| 185 |
|
---|
[76241] | 186 | GLPFN void (GLAPIENTRYP pfn_glFogf)(GLenum pname, GLfloat param);
|
---|
| 187 | #define glFogf pfn_glFogf
|
---|
| 188 |
|
---|
| 189 | GLPFN void (GLAPIENTRYP pfn_glFogfv)(GLenum pname, const GLfloat *params);
|
---|
| 190 | #define glFogfv pfn_glFogfv
|
---|
| 191 |
|
---|
| 192 | GLPFN void (GLAPIENTRYP pfn_glFogi)(GLenum pname, GLint param);
|
---|
| 193 | #define glFogi pfn_glFogi
|
---|
| 194 |
|
---|
| 195 | GLPFN void (GLAPIENTRYP pfn_glFrontFace)(GLenum mode);
|
---|
| 196 | #define glFrontFace pfn_glFrontFace
|
---|
| 197 |
|
---|
| 198 | GLPFN void (GLAPIENTRYP pfn_glGenTextures)(GLsizei n, GLuint *textures);
|
---|
| 199 | #define glGenTextures pfn_glGenTextures
|
---|
| 200 |
|
---|
| 201 | GLPFN void (GLAPIENTRYP pfn_glGetBooleanv)(GLenum pname, GLboolean *params);
|
---|
| 202 | #define glGetBooleanv pfn_glGetBooleanv
|
---|
| 203 |
|
---|
| 204 | GLPFN GLenum (GLAPIENTRYP pfn_glGetError)(void);
|
---|
| 205 | #define glGetError pfn_glGetError
|
---|
| 206 |
|
---|
| 207 | GLPFN void (GLAPIENTRYP pfn_glGetFloatv)(GLenum pname, GLfloat *params);
|
---|
| 208 | #define glGetFloatv pfn_glGetFloatv
|
---|
| 209 |
|
---|
| 210 | GLPFN void (GLAPIENTRYP pfn_glGetIntegerv)(GLenum pname, GLint *params);
|
---|
| 211 | #define glGetIntegerv pfn_glGetIntegerv
|
---|
| 212 |
|
---|
| 213 | GLPFN const GLubyte * (GLAPIENTRYP pfn_glGetString)(GLenum name);
|
---|
| 214 | #define glGetString pfn_glGetString
|
---|
| 215 |
|
---|
| 216 | GLPFN void (GLAPIENTRYP pfn_glGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
|
---|
| 217 | #define glGetTexImage pfn_glGetTexImage
|
---|
| 218 |
|
---|
| 219 | GLPFN void (GLAPIENTRYP pfn_glLightModelfv)(GLenum pname, const GLfloat *params);
|
---|
| 220 | #define glLightModelfv pfn_glLightModelfv
|
---|
| 221 |
|
---|
| 222 | GLPFN void (GLAPIENTRYP pfn_glLightf)(GLenum light, GLenum pname, GLfloat param);
|
---|
| 223 | #define glLightf pfn_glLightf
|
---|
| 224 |
|
---|
| 225 | GLPFN void (GLAPIENTRYP pfn_glLightfv)(GLenum light, GLenum pname, const GLfloat *params);
|
---|
| 226 | #define glLightfv pfn_glLightfv
|
---|
| 227 |
|
---|
| 228 | GLPFN void (GLAPIENTRYP pfn_glLineWidth)(GLfloat width);
|
---|
| 229 | #define glLineWidth pfn_glLineWidth
|
---|
| 230 |
|
---|
| 231 | GLPFN void (GLAPIENTRYP pfn_glLoadIdentity)(void);
|
---|
| 232 | #define glLoadIdentity pfn_glLoadIdentity
|
---|
| 233 |
|
---|
| 234 | GLPFN void (GLAPIENTRYP pfn_glLoadMatrixf)(const GLfloat *m);
|
---|
| 235 | #define glLoadMatrixf pfn_glLoadMatrixf
|
---|
| 236 |
|
---|
| 237 | GLPFN void (GLAPIENTRYP pfn_glMaterialfv)(GLenum face, GLenum pname, const GLfloat *params);
|
---|
| 238 | #define glMaterialfv pfn_glMaterialfv
|
---|
| 239 |
|
---|
| 240 | GLPFN void (GLAPIENTRYP pfn_glMatrixMode)(GLenum mode);
|
---|
| 241 | #define glMatrixMode pfn_glMatrixMode
|
---|
| 242 |
|
---|
| 243 | GLPFN void (GLAPIENTRYP pfn_glMultMatrixf)(const GLfloat *m);
|
---|
| 244 | #define glMultMatrixf pfn_glMultMatrixf
|
---|
| 245 |
|
---|
| 246 | GLPFN void (GLAPIENTRYP pfn_glNormalPointer)(GLenum type, GLsizei stride, const void *pointer);
|
---|
| 247 | #define glNormalPointer pfn_glNormalPointer
|
---|
| 248 |
|
---|
[84725] | 249 | GLPFN void (GLAPIENTRYP pfn_glOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal);
|
---|
| 250 | #define glOrtho pfn_glOrtho
|
---|
[84727] | 251 |
|
---|
[76241] | 252 | GLPFN void (GLAPIENTRYP pfn_glPixelStorei)(GLenum pname, GLint param);
|
---|
| 253 | #define glPixelStorei pfn_glPixelStorei
|
---|
| 254 |
|
---|
| 255 | GLPFN void (GLAPIENTRYP pfn_glPointSize)(GLfloat size);
|
---|
| 256 | #define glPointSize pfn_glPointSize
|
---|
| 257 |
|
---|
| 258 | GLPFN void (GLAPIENTRYP pfn_glPolygonMode)(GLenum face, GLenum mode);
|
---|
| 259 | #define glPolygonMode pfn_glPolygonMode
|
---|
| 260 |
|
---|
| 261 | GLPFN void (GLAPIENTRYP pfn_glPolygonOffset)(GLfloat factor, GLfloat units);
|
---|
| 262 | #define glPolygonOffset pfn_glPolygonOffset
|
---|
| 263 |
|
---|
| 264 | GLPFN void (GLAPIENTRYP pfn_glPopAttrib)(void);
|
---|
| 265 | #define glPopAttrib pfn_glPopAttrib
|
---|
| 266 |
|
---|
| 267 | GLPFN void (GLAPIENTRYP pfn_glPopMatrix)(void);
|
---|
| 268 | #define glPopMatrix pfn_glPopMatrix
|
---|
| 269 |
|
---|
| 270 | GLPFN void (GLAPIENTRYP pfn_glPushAttrib)(GLbitfield mask);
|
---|
| 271 | #define glPushAttrib pfn_glPushAttrib
|
---|
| 272 |
|
---|
| 273 | GLPFN void (GLAPIENTRYP pfn_glPushMatrix)(void);
|
---|
| 274 | #define glPushMatrix pfn_glPushMatrix
|
---|
| 275 |
|
---|
| 276 | GLPFN void (GLAPIENTRYP pfn_glScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
|
---|
| 277 | #define glScissor pfn_glScissor
|
---|
| 278 |
|
---|
| 279 | GLPFN void (GLAPIENTRYP pfn_glShadeModel)(GLenum mode);
|
---|
| 280 | #define glShadeModel pfn_glShadeModel
|
---|
| 281 |
|
---|
| 282 | GLPFN void (GLAPIENTRYP pfn_glStencilFunc)(GLenum func, GLint ref, GLuint mask);
|
---|
| 283 | #define glStencilFunc pfn_glStencilFunc
|
---|
| 284 |
|
---|
| 285 | GLPFN void (GLAPIENTRYP pfn_glStencilMask)(GLuint mask);
|
---|
| 286 | #define glStencilMask pfn_glStencilMask
|
---|
| 287 |
|
---|
| 288 | GLPFN void (GLAPIENTRYP pfn_glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
|
---|
| 289 | #define glStencilOp pfn_glStencilOp
|
---|
| 290 |
|
---|
[84725] | 291 | GLPFN void (GLAPIENTRYP pfn_glTexCoord2f)(GLfloat s, GLfloat t);
|
---|
| 292 | #define glTexCoord2f pfn_glTexCoord2f
|
---|
| 293 |
|
---|
[76241] | 294 | GLPFN void (GLAPIENTRYP pfn_glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const void *pointer);
|
---|
| 295 | #define glTexCoordPointer pfn_glTexCoordPointer
|
---|
| 296 |
|
---|
| 297 | GLPFN void (GLAPIENTRYP pfn_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
---|
| 298 | #define glTexImage2D pfn_glTexImage2D
|
---|
| 299 |
|
---|
| 300 | GLPFN void (GLAPIENTRYP pfn_glTexParameterf)(GLenum target, GLenum pname, GLfloat param);
|
---|
| 301 | #define glTexParameterf pfn_glTexParameterf
|
---|
| 302 |
|
---|
| 303 | GLPFN void (GLAPIENTRYP pfn_glTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
|
---|
| 304 | #define glTexParameterfv pfn_glTexParameterfv
|
---|
| 305 |
|
---|
| 306 | GLPFN void (GLAPIENTRYP pfn_glTexParameteri)(GLenum target, GLenum pname, GLint param);
|
---|
| 307 | #define glTexParameteri pfn_glTexParameteri
|
---|
| 308 |
|
---|
| 309 | GLPFN void (GLAPIENTRYP pfn_glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
---|
| 310 | #define glTexSubImage2D pfn_glTexSubImage2D
|
---|
| 311 |
|
---|
[84725] | 312 | GLPFN void (GLAPIENTRYP pfn_glVertex2i)(GLint x, GLint y);
|
---|
| 313 | #define glVertex2i pfn_glVertex2i
|
---|
| 314 |
|
---|
[76241] | 315 | GLPFN void (GLAPIENTRYP pfn_glVertexPointer)(GLint size, GLenum type, GLsizei stride, const void *pointer);
|
---|
| 316 | #define glVertexPointer pfn_glVertexPointer
|
---|
| 317 |
|
---|
| 318 | GLPFN void (GLAPIENTRYP pfn_glViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
|
---|
| 319 | #define glViewport pfn_glViewport
|
---|
| 320 |
|
---|
[76245] | 321 | /*
|
---|
| 322 | * Extension functions (not exported from OpenGL32 on Windows).
|
---|
| 323 | */
|
---|
| 324 | GLPFN void (GLAPIENTRYP pfn_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
---|
| 325 | #define glBlendColor pfn_glBlendColor
|
---|
| 326 |
|
---|
| 327 | GLPFN void (GLAPIENTRYP pfn_glBlendEquation)(GLenum mode);
|
---|
| 328 | #define glBlendEquation pfn_glBlendEquation
|
---|
| 329 |
|
---|
| 330 | GLPFN void (GLAPIENTRYP pfn_glClientActiveTexture)(GLenum texture);
|
---|
| 331 | #define glClientActiveTexture pfn_glClientActiveTexture
|
---|
| 332 |
|
---|
[76241] | 333 | #ifdef RT_OS_WINDOWS
|
---|
[76245] | 334 | /*
|
---|
| 335 | * WGL.
|
---|
| 336 | */
|
---|
[76241] | 337 | GLPFN HGLRC (WINAPI *pfn_wglCreateContext)(HDC);
|
---|
| 338 | #define wglCreateContext pfn_wglCreateContext
|
---|
| 339 |
|
---|
| 340 | GLPFN BOOL (WINAPI *pfn_wglDeleteContext)(HGLRC);
|
---|
| 341 | #define wglDeleteContext pfn_wglDeleteContext
|
---|
| 342 |
|
---|
| 343 | GLPFN BOOL (WINAPI *pfn_wglMakeCurrent)(HDC, HGLRC);
|
---|
| 344 | #define wglMakeCurrent pfn_wglMakeCurrent
|
---|
| 345 |
|
---|
| 346 | GLPFN BOOL (WINAPI *pfn_wglShareLists)(HGLRC, HGLRC);
|
---|
| 347 | #define wglShareLists pfn_wglShareLists
|
---|
[76247] | 348 |
|
---|
| 349 | #elif defined(RT_OS_LINUX)
|
---|
| 350 | /*
|
---|
| 351 | * GLX
|
---|
| 352 | */
|
---|
[84725] | 353 | GLPFN int (* pfn_glXGetFBConfigAttrib)(Display * dpy, GLXFBConfig config, int attribute, int * value);
|
---|
| 354 | #define glXGetFBConfigAttrib pfn_glXGetFBConfigAttrib
|
---|
| 355 |
|
---|
| 356 | GLPFN XVisualInfo * (* pfn_glXGetVisualFromFBConfig)(Display * dpy, GLXFBConfig config);
|
---|
| 357 | #define glXGetVisualFromFBConfig pfn_glXGetVisualFromFBConfig
|
---|
| 358 |
|
---|
[76247] | 359 | GLPFN Bool (* pfn_glXQueryVersion)(Display * dpy, int * major, int * minor);
|
---|
| 360 | #define glXQueryVersion pfn_glXQueryVersion
|
---|
| 361 |
|
---|
[84725] | 362 | GLPFN GLXFBConfig * (* pfn_glXChooseFBConfig)(Display * dpy, int screen, const int * attrib_list, int * nelements);
|
---|
| 363 | #define glXChooseFBConfig pfn_glXChooseFBConfig
|
---|
| 364 |
|
---|
[76247] | 365 | GLPFN XVisualInfo* (* pfn_glXChooseVisual)(Display * dpy, int screen, int * attribList);
|
---|
| 366 | #define glXChooseVisual pfn_glXChooseVisual
|
---|
| 367 |
|
---|
| 368 | GLPFN GLXContext (* pfn_glXCreateContext)(Display * dpy, XVisualInfo * vis, GLXContext shareList, Bool direct);
|
---|
| 369 | #define glXCreateContext pfn_glXCreateContext
|
---|
| 370 |
|
---|
[84725] | 371 | GLPFN GLXPixmap (* pfn_glXCreatePixmap)(Display * dpy, GLXFBConfig config, Pixmap pixmap, const int * attrib_list);
|
---|
| 372 | #define glXCreatePixmap pfn_glXCreatePixmap
|
---|
| 373 |
|
---|
[76247] | 374 | GLPFN Bool (* pfn_glXMakeCurrent)(Display * dpy, GLXDrawable drawable, GLXContext ctx);
|
---|
| 375 | #define glXMakeCurrent pfn_glXMakeCurrent
|
---|
| 376 |
|
---|
| 377 | GLPFN void (* pfn_glXDestroyContext)(Display * dpy, GLXContext ctx);
|
---|
| 378 | #define glXDestroyContext pfn_glXDestroyContext
|
---|
| 379 |
|
---|
[84725] | 380 | GLPFN void (* pfn_glXDestroyPixmap)(Display * dpy, GLXPixmap Pixmap);
|
---|
| 381 | #define glXDestroyPixmap pfn_glXDestroyPixmap
|
---|
| 382 |
|
---|
[76263] | 383 | /*
|
---|
| 384 | * X11
|
---|
| 385 | */
|
---|
| 386 | GLPFN int (* pfn_XConfigureWindow)(Display *display, Window w, unsigned value_mask, XWindowChanges *changes);
|
---|
| 387 | #define XConfigureWindow pfn_XConfigureWindow
|
---|
| 388 |
|
---|
| 389 | GLPFN int (* pfn_XCloseDisplay)(Display *display);
|
---|
| 390 | #define XCloseDisplay pfn_XCloseDisplay
|
---|
| 391 |
|
---|
| 392 | GLPFN Colormap (* pfn_XCreateColormap)(Display *display, Window w, Visual *visual, int alloc);
|
---|
| 393 | #define XCreateColormap pfn_XCreateColormap
|
---|
| 394 |
|
---|
[84725] | 395 | GLPFN Pixmap (* pfn_XCreatePixmap)(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth);
|
---|
| 396 | #define XCreatePixmap pfn_XCreatePixmap
|
---|
| 397 |
|
---|
[76263] | 398 | GLPFN Window (* pfn_XCreateWindow)(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height,
|
---|
| 399 | unsigned int border_width, int depth, unsigned int window_class, Visual *visual, unsigned long valuemask, XSetWindowAttributes *attributes);
|
---|
| 400 | #define XCreateWindow pfn_XCreateWindow
|
---|
| 401 |
|
---|
| 402 | GLPFN Window (* pfn_XDefaultRootWindow)(Display *display);
|
---|
| 403 | #define XDefaultRootWindow pfn_XDefaultRootWindow
|
---|
| 404 |
|
---|
| 405 | GLPFN int (* pfn_XDestroyWindow)(Display *display, Window w);
|
---|
| 406 | #define XDestroyWindow pfn_XDestroyWindow
|
---|
| 407 |
|
---|
[84725] | 408 | GLPFN int (* pfn_XFree)(void *data);
|
---|
| 409 | #define XFree pfn_XFree
|
---|
| 410 |
|
---|
| 411 | GLPFN int (* pfn_XFreePixmap)(Display *display, Pixmap pixmap);
|
---|
| 412 | #define XFreePixmap pfn_XFreePixmap
|
---|
| 413 |
|
---|
[76270] | 414 | GLPFN Status (* pfn_XInitThreads)(void);
|
---|
| 415 | #define XInitThreads pfn_XInitThreads
|
---|
| 416 |
|
---|
[76267] | 417 | GLPFN int (* pfn_XNextEvent)(Display *display, XEvent *event_return);
|
---|
[76263] | 418 | #define XNextEvent pfn_XNextEvent
|
---|
| 419 |
|
---|
| 420 | GLPFN Display *(* pfn_XOpenDisplay)(char *display_name);
|
---|
| 421 | #define XOpenDisplay pfn_XOpenDisplay
|
---|
| 422 |
|
---|
| 423 | GLPFN int (* pfn_XPending)(Display *display);
|
---|
| 424 | #define XPending pfn_XPending
|
---|
| 425 |
|
---|
[84725] | 426 | GLPFN int (* (* pfn_XSetErrorHandler)(int (*handler)(Display *, XErrorEvent *)))(Display *, XErrorEvent *);
|
---|
| 427 | #define XSetErrorHandler pfn_XSetErrorHandler
|
---|
| 428 |
|
---|
| 429 | GLPFN int (* pfn_XSync)(Display *display, Bool discard);
|
---|
| 430 | #define XSync pfn_XSync
|
---|
| 431 |
|
---|
[85368] | 432 | GLPFN int (* pfn_XScreenNumberOfScreen)(Screen *screen);
|
---|
| 433 | #define XScreenNumberOfScreen pfn_XScreenNumberOfScreen
|
---|
| 434 |
|
---|
| 435 | GLPFN int (* pfn_XMapWindow)(Display *display, Window w);
|
---|
| 436 | #define XMapWindow pfn_XMapWindow
|
---|
| 437 |
|
---|
| 438 | GLPFN Status (* pfn_XGetWindowAttributes)(Display *display, Window w, XWindowAttributes *window_attributes_return);
|
---|
| 439 | #define XGetWindowAttributes pfn_XGetWindowAttributes
|
---|
| 440 |
|
---|
[76241] | 441 | #endif
|
---|
| 442 |
|
---|
[76565] | 443 | #endif /* !VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_glLdr_h */
|
---|