1 // 2 // Copyright 2022 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // entry_points_glx.h: Declares the exported GLX functions. 7 8 #ifndef LIBGL_GLX_H_ 9 #define LIBGL_GLX_H_ 10 11 #include <export.h> 12 #include "angle_gl.h" 13 14 #include "GLX/glxext.h" 15 16 extern "C" { 17 18 ANGLE_EXPORT const char *GL_APIENTRY glXQueryServerString(Display *dpy, int name); 19 20 ANGLE_EXPORT GLXFBConfig *GL_APIENTRY glXChooseFBConfig(Display *dpy, 21 int screen, 22 const int *attrib_list, 23 int *nelements); 24 25 ANGLE_EXPORT XVisualInfo GL_APIENTRY *glXChooseVisual(Display *dpy, int screen, int *attrib_list); 26 27 ANGLE_EXPORT void GL_APIENTRY glXCopyContext(Display *dpy, 28 GLXContext src, 29 GLXContext dst, 30 unsigned long mask); 31 32 ANGLE_EXPORT GLXContext GL_APIENTRY glXCreateContext(Display *dpy, 33 XVisualInfo *vis, 34 GLXContext shareList, 35 bool direct); 36 37 ANGLE_EXPORT GLXPixmap GL_APIENTRY glXCreateGLXPixmap(Display *dpy, 38 XVisualInfo *vis, 39 Pixmap pixmap); 40 41 ANGLE_EXPORT GLXContext GL_APIENTRY glXCreateNewContext(Display *dpy, 42 GLXFBConfig config, 43 int render_type, 44 GLXContext share_list, 45 bool direct); 46 47 ANGLE_EXPORT GLXPbuffer GL_APIENTRY glXCreatePbuffer(Display *dpy, 48 GLXFBConfig config, 49 const int *attrib_list); 50 51 ANGLE_EXPORT GLXPixmap GL_APIENTRY glXCreatePixmap(Display *dpy, 52 GLXFBConfig config, 53 Pixmap pixmap, 54 const int *attrib_list); 55 56 ANGLE_EXPORT GLXWindow GL_APIENTRY glXCreateWindow(Display *dpy, 57 GLXFBConfig config, 58 Window win, 59 const int *attrib_list); 60 61 ANGLE_EXPORT void GL_APIENTRY glXDestroyContext(Display *dpy, GLXContext ctx); 62 63 ANGLE_EXPORT void GL_APIENTRY glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix); 64 65 ANGLE_EXPORT void GL_APIENTRY glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf); 66 67 ANGLE_EXPORT void GL_APIENTRY glXDestroyPixmap(Display *dpy, GLXPixmap pixmap); 68 69 ANGLE_EXPORT void GL_APIENTRY glXDestroyWindow(Display *dpy, GLXWindow win); 70 71 ANGLE_EXPORT const char *GL_APIENTRY glXGetClientString(Display *dpy, int name); 72 73 ANGLE_EXPORT int GL_APIENTRY glXGetConfig(Display *dpy, XVisualInfo *vis, int attrib, int *value); 74 75 ANGLE_EXPORT GLXContext GL_APIENTRY glXGetCurrentContext(); 76 77 ANGLE_EXPORT Display *GL_APIENTRY glXGetCurrentDisplay(); 78 79 ANGLE_EXPORT GLXDrawable GL_APIENTRY glXGetCurrentDrawable(); 80 81 ANGLE_EXPORT GLXDrawable GL_APIENTRY glXGetCurrentReadDrawable(); 82 83 ANGLE_EXPORT int GL_APIENTRY glXGetFBConfigAttrib(Display *dpy, 84 GLXFBConfig config, 85 int attribute, 86 int *value); 87 88 ANGLE_EXPORT GLXFBConfig *GL_APIENTRY glXGetFBConfigs(Display *dpy, int screen, int *nelements); 89 90 ANGLE_EXPORT __GLXextFuncPtr GL_APIENTRY glXGetProcAddress(const GLubyte *procName); 91 92 ANGLE_EXPORT void GL_APIENTRY glXGetSelectedEvent(Display *dpy, 93 GLXDrawable draw, 94 unsigned long *event_mask); 95 96 ANGLE_EXPORT XVisualInfo *GL_APIENTRY glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config); 97 98 ANGLE_EXPORT bool GL_APIENTRY glXIsDirect(Display *dpy, GLXContext ctx); 99 100 ANGLE_EXPORT bool GL_APIENTRY glXMakeContextCurrent(Display *dpy, 101 GLXDrawable draw, 102 GLXDrawable read, 103 GLXContext ctx); 104 105 ANGLE_EXPORT bool GL_APIENTRY glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx); 106 107 ANGLE_EXPORT int GL_APIENTRY glXQueryContext(Display *dpy, 108 GLXContext ctx, 109 int attribute, 110 int *value); 111 112 ANGLE_EXPORT int GL_APIENTRY glXQueryDrawable(Display *dpy, 113 GLXDrawable draw, 114 int attribute, 115 unsigned int *value); 116 117 ANGLE_EXPORT bool GL_APIENTRY glXQueryExtension(Display *dpy, int *errorBase, int *eventBase); 118 119 ANGLE_EXPORT const char *GL_APIENTRY glXQueryExtensionsString(Display *dpy, int screen); 120 121 ANGLE_EXPORT bool GL_APIENTRY glXQueryVersion(Display *dpy, int *major, int *minor); 122 123 ANGLE_EXPORT void GL_APIENTRY glXSelectEvent(Display *dpy, 124 GLXDrawable draw, 125 unsigned long event_mask); 126 127 ANGLE_EXPORT void GL_APIENTRY glXSwapBuffers(Display *dpy, GLXDrawable drawable); 128 129 ANGLE_EXPORT void GL_APIENTRY glXUseXFont(Font font, int first, int count, int listBase); 130 131 ANGLE_EXPORT void GL_APIENTRY glXWaitGL(); 132 133 ANGLE_EXPORT void GL_APIENTRY glXWaitX(); 134 135 } // extern "C" 136 137 #endif // LIBGL_GLX_H_ 138