• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.cpp: Implements the exported GLX functions.
7 
8 #include <X11/Xlib.h>
9 #include <X11/Xutil.h>
10 
11 using GLXPixmap   = XID;
12 using GLXDrawable = XID;
13 using GLXPbuffer  = XID;
14 using GLXContext  = XID;
15 #include "entry_points_glx.h"
16 
17 #include "common/debug.h"
18 
19 extern "C" {
20 
glXQueryServerString(Display * dpy,int name)21 const char *GL_APIENTRY glXQueryServerString(Display *dpy, int name)
22 {
23     UNIMPLEMENTED();
24     return nullptr;
25 }
26 
glXChooseFBConfig(Display * dpy,int screen,const int * attrib_list,int * nelements)27 GLXFBConfig *GL_APIENTRY glXChooseFBConfig(Display *dpy,
28                                            int screen,
29                                            const int *attrib_list,
30                                            int *nelements)
31 {
32     UNIMPLEMENTED();
33     return nullptr;
34 }
35 
glXChooseVisual(Display * dpy,int screen,int * attrib_list)36 XVisualInfo *GL_APIENTRY glXChooseVisual(Display *dpy, int screen, int *attrib_list)
37 {
38     UNIMPLEMENTED();
39     return nullptr;
40 }
41 
glXCopyContext(Display * dpy,GLXContext src,GLXContext dst,unsigned long mask)42 void GL_APIENTRY glXCopyContext(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask)
43 {
44     UNIMPLEMENTED();
45 }
46 
glXCreateContext(Display * dpy,XVisualInfo * vis,GLXContext shareList,bool direct)47 GLXContext GL_APIENTRY glXCreateContext(Display *dpy,
48                                         XVisualInfo *vis,
49                                         GLXContext shareList,
50                                         bool direct)
51 {
52     UNIMPLEMENTED();
53     return GLXContext{};
54 }
55 
glXCreateGLXPixmap(Display * dpy,XVisualInfo * vis,Pixmap pixmap)56 GLXPixmap GL_APIENTRY glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis, Pixmap pixmap)
57 {
58     UNIMPLEMENTED();
59     return GLXPixmap{};
60 }
61 
glXCreateNewContext(Display * dpy,GLXFBConfig config,int render_type,GLXContext share_list,bool direct)62 GLXContext GL_APIENTRY glXCreateNewContext(Display *dpy,
63                                            GLXFBConfig config,
64                                            int render_type,
65                                            GLXContext share_list,
66                                            bool direct)
67 {
68     UNIMPLEMENTED();
69     return GLXContext{};
70 }
71 
glXCreatePbuffer(Display * dpy,GLXFBConfig config,const int * attrib_list)72 GLXPbuffer GL_APIENTRY glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attrib_list)
73 {
74     UNIMPLEMENTED();
75     return GLXPbuffer{};
76 }
77 
glXCreatePixmap(Display * dpy,GLXFBConfig config,Pixmap pixmap,const int * attrib_list)78 GLXPixmap GL_APIENTRY glXCreatePixmap(Display *dpy,
79                                       GLXFBConfig config,
80                                       Pixmap pixmap,
81                                       const int *attrib_list)
82 {
83     UNIMPLEMENTED();
84     return GLXPixmap{};
85 }
86 
glXCreateWindow(Display * dpy,GLXFBConfig config,Window win,const int * attrib_list)87 GLXWindow GL_APIENTRY glXCreateWindow(Display *dpy,
88                                       GLXFBConfig config,
89                                       Window win,
90                                       const int *attrib_list)
91 {
92     UNIMPLEMENTED();
93     return GLXWindow{};
94 }
95 
glXDestroyContext(Display * dpy,GLXContext ctx)96 void GL_APIENTRY glXDestroyContext(Display *dpy, GLXContext ctx)
97 {
98     UNIMPLEMENTED();
99 }
100 
glXDestroyGLXPixmap(Display * dpy,GLXPixmap pix)101 void GL_APIENTRY glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix)
102 {
103     UNIMPLEMENTED();
104 }
105 
glXDestroyPbuffer(Display * dpy,GLXPbuffer pbuf)106 void GL_APIENTRY glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf)
107 {
108     UNIMPLEMENTED();
109 }
110 
glXDestroyPixmap(Display * dpy,GLXPixmap pixmap)111 void GL_APIENTRY glXDestroyPixmap(Display *dpy, GLXPixmap pixmap)
112 {
113     UNIMPLEMENTED();
114 }
115 
glXDestroyWindow(Display * dpy,GLXWindow win)116 void GL_APIENTRY glXDestroyWindow(Display *dpy, GLXWindow win)
117 {
118     UNIMPLEMENTED();
119 }
120 
glXGetClientString(Display * dpy,int name)121 const char *GL_APIENTRY glXGetClientString(Display *dpy, int name)
122 {
123     UNIMPLEMENTED();
124     return nullptr;
125 }
126 
glXGetConfig(Display * dpy,XVisualInfo * vis,int attrib,int * value)127 int GL_APIENTRY glXGetConfig(Display *dpy, XVisualInfo *vis, int attrib, int *value)
128 {
129     UNIMPLEMENTED();
130     return 1;
131 }
132 
glXGetCurrentContext()133 GLXContext GL_APIENTRY glXGetCurrentContext()
134 {
135     UNIMPLEMENTED();
136     return GLXContext{};
137 }
138 
glXGetCurrentDisplay()139 Display *GL_APIENTRY glXGetCurrentDisplay()
140 {
141     UNIMPLEMENTED();
142     return nullptr;
143 }
144 
glXGetCurrentDrawable()145 GLXDrawable GL_APIENTRY glXGetCurrentDrawable()
146 {
147     UNIMPLEMENTED();
148     return GLXDrawable{};
149 }
150 
glXGetCurrentReadDrawable()151 GLXDrawable GL_APIENTRY glXGetCurrentReadDrawable()
152 {
153     UNIMPLEMENTED();
154     return GLXDrawable{};
155 }
156 
glXGetFBConfigAttrib(Display * dpy,GLXFBConfig config,int attribute,int * value)157 int GL_APIENTRY glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)
158 {
159     UNIMPLEMENTED();
160     return 1;
161 }
162 
glXGetFBConfigs(Display * dpy,int screen,int * nelements)163 GLXFBConfig *GL_APIENTRY glXGetFBConfigs(Display *dpy, int screen, int *nelements)
164 {
165     UNIMPLEMENTED();
166     return nullptr;
167 }
168 
glXGetProcAddress(const GLubyte * procName)169 __GLXextFuncPtr GL_APIENTRY glXGetProcAddress(const GLubyte *procName)
170 {
171     UNIMPLEMENTED();
172     return nullptr;
173 }
174 
glXGetSelectedEvent(Display * dpy,GLXDrawable draw,unsigned long * event_mask)175 void GL_APIENTRY glXGetSelectedEvent(Display *dpy, GLXDrawable draw, unsigned long *event_mask)
176 {
177     UNIMPLEMENTED();
178 }
179 
glXGetVisualFromFBConfig(Display * dpy,GLXFBConfig config)180 XVisualInfo *GL_APIENTRY glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
181 {
182     UNIMPLEMENTED();
183     return nullptr;
184 }
185 
glXIsDirect(Display * dpy,GLXContext ctx)186 bool GL_APIENTRY glXIsDirect(Display *dpy, GLXContext ctx)
187 {
188     UNIMPLEMENTED();
189     return false;
190 }
191 
glXMakeContextCurrent(Display * dpy,GLXDrawable draw,GLXDrawable read,GLXContext ctx)192 bool GL_APIENTRY glXMakeContextCurrent(Display *dpy,
193                                        GLXDrawable draw,
194                                        GLXDrawable read,
195                                        GLXContext ctx)
196 {
197     UNIMPLEMENTED();
198     return false;
199 }
200 
glXMakeCurrent(Display * dpy,GLXDrawable drawable,GLXContext ctx)201 bool GL_APIENTRY glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
202 {
203     UNIMPLEMENTED();
204     return false;
205 }
206 
glXQueryContext(Display * dpy,GLXContext ctx,int attribute,int * value)207 int GL_APIENTRY glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value)
208 {
209     UNIMPLEMENTED();
210     return 1;
211 }
212 
glXQueryDrawable(Display * dpy,GLXDrawable draw,int attribute,unsigned int * value)213 int GL_APIENTRY glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
214 {
215     UNIMPLEMENTED();
216     return 1;
217 }
218 
glXQueryExtension(Display * dpy,int * errorBase,int * eventBase)219 bool GL_APIENTRY glXQueryExtension(Display *dpy, int *errorBase, int *eventBase)
220 {
221     UNIMPLEMENTED();
222     return 1;
223 }
224 
glXQueryExtensionsString(Display * dpy,int screen)225 const char *GL_APIENTRY glXQueryExtensionsString(Display *dpy, int screen)
226 {
227     UNIMPLEMENTED();
228     return nullptr;
229 }
230 
glXQueryVersion(Display * dpy,int * major,int * minor)231 bool GL_APIENTRY glXQueryVersion(Display *dpy, int *major, int *minor)
232 {
233     UNIMPLEMENTED();
234     return false;
235 }
236 
glXSelectEvent(Display * dpy,GLXDrawable draw,unsigned long event_mask)237 void GL_APIENTRY glXSelectEvent(Display *dpy, GLXDrawable draw, unsigned long event_mask)
238 {
239     UNIMPLEMENTED();
240 }
241 
glXSwapBuffers(Display * dpy,GLXDrawable drawable)242 void GL_APIENTRY glXSwapBuffers(Display *dpy, GLXDrawable drawable)
243 {
244     UNIMPLEMENTED();
245 }
246 
glXUseXFont(Font font,int first,int count,int listBase)247 void GL_APIENTRY glXUseXFont(Font font, int first, int count, int listBase)
248 {
249     UNIMPLEMENTED();
250 }
251 
glXWaitGL()252 void GL_APIENTRY glXWaitGL()
253 {
254     UNIMPLEMENTED();
255 }
256 
glXWaitX()257 void GL_APIENTRY glXWaitX()
258 {
259     UNIMPLEMENTED();
260 }
261 
262 }  // extern "C"
263