31 #include <GL/vms_x_fix.h>
35 #pragma message disable nosimpint
39 #include <X11/Xutil.h>
42 #pragma message enable nosimpint
48 #if defined(USE_MGL_NAMESPACE)
58 #define GLX_VERSION_1_1 1
59 #define GLX_VERSION_1_2 1
60 #define GLX_VERSION_1_3 1
61 #define GLX_VERSION_1_4 1
63 #define GLX_EXTENSION_NAME "GLX"
71 #define GLX_BUFFER_SIZE 2
74 #define GLX_DOUBLEBUFFER 5
76 #define GLX_AUX_BUFFERS 7
77 #define GLX_RED_SIZE 8
78 #define GLX_GREEN_SIZE 9
79 #define GLX_BLUE_SIZE 10
80 #define GLX_ALPHA_SIZE 11
81 #define GLX_DEPTH_SIZE 12
82 #define GLX_STENCIL_SIZE 13
83 #define GLX_ACCUM_RED_SIZE 14
84 #define GLX_ACCUM_GREEN_SIZE 15
85 #define GLX_ACCUM_BLUE_SIZE 16
86 #define GLX_ACCUM_ALPHA_SIZE 17
92 #define GLX_BAD_SCREEN 1
93 #define GLX_BAD_ATTRIBUTE 2
94 #define GLX_NO_EXTENSION 3
95 #define GLX_BAD_VISUAL 4
96 #define GLX_BAD_CONTEXT 5
97 #define GLX_BAD_VALUE 6
98 #define GLX_BAD_ENUM 7
105 #define GLX_VERSION 2
106 #define GLX_EXTENSIONS 3
112 #define GLX_CONFIG_CAVEAT 0x20
113 #define GLX_DONT_CARE 0xFFFFFFFF
114 #define GLX_X_VISUAL_TYPE 0x22
115 #define GLX_TRANSPARENT_TYPE 0x23
116 #define GLX_TRANSPARENT_INDEX_VALUE 0x24
117 #define GLX_TRANSPARENT_RED_VALUE 0x25
118 #define GLX_TRANSPARENT_GREEN_VALUE 0x26
119 #define GLX_TRANSPARENT_BLUE_VALUE 0x27
120 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
121 #define GLX_WINDOW_BIT 0x00000001
122 #define GLX_PIXMAP_BIT 0x00000002
123 #define GLX_PBUFFER_BIT 0x00000004
124 #define GLX_AUX_BUFFERS_BIT 0x00000010
125 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
126 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
127 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
128 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
129 #define GLX_DEPTH_BUFFER_BIT 0x00000020
130 #define GLX_STENCIL_BUFFER_BIT 0x00000040
131 #define GLX_ACCUM_BUFFER_BIT 0x00000080
132 #define GLX_NONE 0x8000
133 #define GLX_SLOW_CONFIG 0x8001
134 #define GLX_TRUE_COLOR 0x8002
135 #define GLX_DIRECT_COLOR 0x8003
136 #define GLX_PSEUDO_COLOR 0x8004
137 #define GLX_STATIC_COLOR 0x8005
138 #define GLX_GRAY_SCALE 0x8006
139 #define GLX_STATIC_GRAY 0x8007
140 #define GLX_TRANSPARENT_RGB 0x8008
141 #define GLX_TRANSPARENT_INDEX 0x8009
142 #define GLX_VISUAL_ID 0x800B
143 #define GLX_SCREEN 0x800C
144 #define GLX_NON_CONFORMANT_CONFIG 0x800D
145 #define GLX_DRAWABLE_TYPE 0x8010
146 #define GLX_RENDER_TYPE 0x8011
147 #define GLX_X_RENDERABLE 0x8012
148 #define GLX_FBCONFIG_ID 0x8013
149 #define GLX_RGBA_TYPE 0x8014
150 #define GLX_COLOR_INDEX_TYPE 0x8015
151 #define GLX_MAX_PBUFFER_WIDTH 0x8016
152 #define GLX_MAX_PBUFFER_HEIGHT 0x8017
153 #define GLX_MAX_PBUFFER_PIXELS 0x8018
154 #define GLX_PRESERVED_CONTENTS 0x801B
155 #define GLX_LARGEST_PBUFFER 0x801C
156 #define GLX_WIDTH 0x801D
157 #define GLX_HEIGHT 0x801E
158 #define GLX_EVENT_MASK 0x801F
159 #define GLX_DAMAGED 0x8020
160 #define GLX_SAVED 0x8021
161 #define GLX_WINDOW 0x8022
162 #define GLX_PBUFFER 0x8023
163 #define GLX_PBUFFER_HEIGHT 0x8040
164 #define GLX_PBUFFER_WIDTH 0x8041
165 #define GLX_RGBA_BIT 0x00000001
166 #define GLX_COLOR_INDEX_BIT 0x00000002
167 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
173 #define GLX_SAMPLE_BUFFERS 0x186a0
174 #define GLX_SAMPLES 0x186a1
195 #define GLX_PbufferClobber 0
196 #define GLX_BufferSwapComplete 1
198 #define __GLX_NUMBER_EVENTS 17
204 GLXContext shareList,
Bool direct );
212 unsigned long mask );
228 int attrib,
int *
value );
283 unsigned int *
value );
286 int renderType, GLXContext shareList,
290 GLXDrawable read, GLXContext
ctx );
298 unsigned long mask );
301 unsigned long *
mask );
304 typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *
dpy,
int screen,
int *nelements);
305 typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *
dpy,
int screen,
const int *
attrib_list,
int *nelements);
307 typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *
dpy, GLXFBConfig
config);
318 typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (
void);
327 #ifndef GLX_ARB_get_proc_address
328 #define GLX_ARB_get_proc_address 1
344 #ifndef GLX_GLXEXT_LEGACY
359 #ifndef GLX_NV_vertex_array_range
360 #define GLX_NV_vertex_array_range
374 #ifndef GLX_ARB_render_texture
375 #define GLX_ARB_render_texture 1
387 #ifndef GLX_NV_float_buffer
388 #define GLX_NV_float_buffer 1
390 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
399 #ifndef GLX_MESA_swap_frame_usage
400 #define GLX_MESA_swap_frame_usage 1
419 #ifndef GLX_MESA_swap_control
420 #define GLX_MESA_swap_control 1
436 #ifndef GLX_EXT_texture_from_pixmap
437 #define GLX_EXT_texture_from_pixmap 1
439 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
440 #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
441 #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
442 #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
443 #define GLX_Y_INVERTED_EXT 0x20D4
445 #define GLX_TEXTURE_FORMAT_EXT 0x20D5
446 #define GLX_TEXTURE_TARGET_EXT 0x20D6
447 #define GLX_MIPMAP_TEXTURE_EXT 0x20D7
449 #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
450 #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
451 #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
453 #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
454 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
455 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
457 #define GLX_TEXTURE_1D_EXT 0x20DB
458 #define GLX_TEXTURE_2D_EXT 0x20DC
459 #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
461 #define GLX_FRONT_LEFT_EXT 0x20DE
462 #define GLX_FRONT_RIGHT_EXT 0x20DF
463 #define GLX_BACK_LEFT_EXT 0x20E0
464 #define GLX_BACK_RIGHT_EXT 0x20E1
465 #define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
466 #define GLX_BACK_EXT GLX_BACK_LEFT_EXT
467 #define GLX_AUX0_EXT 0x20E2
468 #define GLX_AUX1_EXT 0x20E3
469 #define GLX_AUX2_EXT 0x20E4
470 #define GLX_AUX3_EXT 0x20E5
471 #define GLX_AUX4_EXT 0x20E6
472 #define GLX_AUX5_EXT 0x20E7
473 #define GLX_AUX6_EXT 0x20E8
474 #define GLX_AUX7_EXT 0x20E9
475 #define GLX_AUX8_EXT 0x20EA
476 #define GLX_AUX9_EXT 0x20EB
493 unsigned long serial;
496 GLXDrawable drawable;
497 unsigned int buffer_mask;
498 unsigned int aux_buffer;
EGLSurface EGLint attribute
GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList)
GLXWindow(* PFNGLXCREATEWINDOWPROC)(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list)
int(* PFNGLXQUERYCONTEXTPROC)(Display *dpy, GLXContext ctx, int attribute, int *value)
int(* PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask)
#define glXGetCurrentDrawable
struct __GLXcontextRec * GLXContext
#define glXGetProcAddress
GLXPixmap(* PFNGLXCREATEPIXMAPPROC)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list)
void(* PFNGLXQUERYDRAWABLEPROC)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
#define glXQueryExtension
void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf)
EGLSurface EGLint EGLint EGLint EGLint height
GLXFBConfig * glXGetFBConfigs(Display *dpy, int screen, int *nelements)
GLXFBConfig * glXChooseFBConfig(Display *dpy, int screen, const int *attribList, int *nitems)
#define glXQueryExtensionsString
EGLImageKHR EGLint * name
void(* PFNGLXDESTROYPIXMAPPROC)(Display *dpy, GLXPixmap pixmap)
EGLSurface const EGLint * attrib_list
void(* PFNGLXGETSELECTEDEVENTPROC)(Display *dpy, GLXDrawable draw, unsigned long *event_mask)
int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage)
GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct)
void(* PFNGLXFREEMEMORYNVPROC)(void *pointer)
GLXContext(* PFNGLXCREATENEWCONTEXTPROC)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList)
#define glXQueryServerString
#define glXGetCurrentContext
GLsizei const GLvoid * pointer
void(* PFNGLXDESTROYWINDOWPROC)(Display *dpy, GLXWindow win)
void * glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority)
EGLContext EGLenum EGLClientBuffer buffer
int glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value)
#define glXCreateGLXPixmap
Bool(* PFNGLXMAKECONTEXTCURRENTPROC)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
GLXDrawable glXGetCurrentReadDrawable(void)
Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer)
GLXBufferSwapComplete glxbufferswapcomplete
EGLSurface EGLint EGLint EGLint width
void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
void(* PFNGLXDESTROYPBUFFERPROC)(Display *dpy, GLXPbuffer pbuf)
void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer)
#define glXGetProcAddressARB
struct __GLXFBConfigRec * GLXFBConfig
XVisualInfo * glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
int(* PFNGLXGETFBCONFIGATTRIBPROC)(Display *dpy, GLXFBConfig config, int attribute, int *value)
#define glXDestroyContext
GLXPbufferClobberEvent glxpbufferclobber
__GLXextFuncPtr(* PFNGLXGETPROCADDRESSPROC)(const GLubyte *procName)
int(* PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval)
union __GLXEvent GLXEvent
void glXDestroyWindow(Display *dpy, GLXWindow window)
GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList)
void(* PFNGLXSELECTEVENTPROC)(Display *dpy, GLXDrawable draw, unsigned long event_mask)
int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
EGLSurface EGLint EGLint y
int(* PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable)
void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list)
EGLSurface EGLint void ** value
int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
EGLConfig struct EGLClientPixmapHI * pixmap
int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)
int glXSwapIntervalMESA(unsigned int interval)
void(* __GLXextFuncPtr)(void)
GLXPbuffer(* PFNGLXCREATEPBUFFERPROC)(Display *dpy, GLXFBConfig config, const int *attrib_list)
void glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask)
Bool glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
void glXFreeMemoryNV(GLvoid *pointer)
#define glXDestroyGLXPixmap
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
#define glXGetClientString
GLXDrawable(* PFNGLXGETCURRENTREADDRAWABLEPROC)(void)
GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const int *attribList)
int(* PFNGLXGETFRAMEUSAGEMESAPROC)(Display *dpy, GLXDrawable drawable, float *usage)
int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage)
int(* PFNGLXGETSWAPINTERVALMESAPROC)(void)
Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer)
Display * glXGetCurrentDisplay(void)
HGLRC const int * attribList
GLsizeiptr const GLvoid GLenum usage
void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap)
int glXGetSwapIntervalMESA(void)
int(* PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable)