VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/glx_c_exports.c@ 78376

Last change on this file since 78376 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 11.2 KB
Line 
1/* $Id: glx_c_exports.c 76553 2019-01-01 01:45:53Z vboxsync $ */
2/** @file
3 * VirtualBox guest OpenGL DRI GLX C stubs
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#include "stub.h"
19#include "dri_glx.h"
20#include "fakedri_drv.h"
21
22
23#ifdef VBOXOGL_FAKEDRI
24/*DECLEXPORT(void) VBOXGLXENTRYTAG(glXGetDriverConfig)(const char *driverName)
25{
26 return glxim.GetDriverConfig(driverName);
27}*/
28
29DECLEXPORT(void) VBOXGLXENTRYTAG(glXFreeMemoryMESA)(Display *dpy, int scrn, void *pointer)
30{
31 return glxim.FreeMemoryMESA(dpy, scrn, pointer);
32}
33
34DECLEXPORT(GLXContext) VBOXGLXENTRYTAG(glXImportContextEXT)(Display *dpy, GLXContextID contextID)
35{
36 return glxim.ImportContextEXT(dpy, contextID);
37}
38
39DECLEXPORT(GLXContextID) VBOXGLXENTRYTAG(glXGetContextIDEXT)(const GLXContext ctx)
40{
41 return glxim.GetContextIDEXT(ctx);
42}
43
44DECLEXPORT(Bool) VBOXGLXENTRYTAG(glXMakeCurrentReadSGI)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
45{
46 return glxim.MakeCurrentReadSGI(display, draw, read, ctx);
47}
48
49
50/*const char * VBOXGLXENTRYTAG(glXGetScreenDriver)(Display *dpy, int scrNum)
51{
52 return glxim.GetScreenDriver(dpy, scrNum);
53}*/
54
55
56DECLEXPORT(Display*) VBOXGLXENTRYTAG(glXGetCurrentDisplayEXT)(void)
57{
58 return glxim.GetCurrentDisplayEXT();
59}
60
61DECLEXPORT(void) VBOXGLXENTRYTAG(glXFreeContextEXT)(Display *dpy, GLXContext ctx)
62{
63 return glxim.FreeContextEXT(dpy, ctx);
64}
65
66/*Mesa internal*/
67DECLEXPORT(int) VBOXGLXENTRYTAG(glXQueryContextInfoEXT)(Display *dpy, GLXContext ctx)
68{
69 return glxim.QueryContextInfoEXT(dpy, ctx);
70}
71
72DECLEXPORT(void *) VBOXGLXENTRYTAG(glXAllocateMemoryMESA)(Display *dpy, int scrn,
73 size_t size, float readFreq,
74 float writeFreq, float priority)
75{
76 return glxim.AllocateMemoryMESA(dpy, scrn, size, readFreq, writeFreq, priority);
77}
78
79DECLEXPORT(GLuint) VBOXGLXENTRYTAG(glXGetMemoryOffsetMESA)(Display *dpy, int scrn, const void *pointer )
80{
81 return glxim.GetMemoryOffsetMESA(dpy, scrn, pointer);
82}
83
84
85DECLEXPORT(GLXPixmap) VBOXGLXENTRYTAG(glXCreateGLXPixmapMESA)(Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap)
86{
87 return glxim.CreateGLXPixmapMESA(dpy, visual, pixmap, cmap);
88}
89#endif
90
91/*Common glX functions*/
92DECLEXPORT(void) VBOXGLXENTRYTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, unsigned long mask)
93{
94 return glxim.CopyContext(dpy, src, dst, mask);
95}
96
97
98DECLEXPORT(void) VBOXGLXENTRYTAG(glXUseXFont)(Font font, int first, int count, int listBase)
99{
100 return glxim.UseXFont(font, first, count, listBase);
101}
102
103DECLEXPORT(CR_GLXFuncPtr) VBOXGLXENTRYTAG(glXGetProcAddress)(const GLubyte *name)
104{
105 return glxim.GetProcAddress(name);
106}
107
108DECLEXPORT(Bool) VBOXGLXENTRYTAG(glXQueryExtension)(Display *dpy, int *errorBase, int *eventBase)
109{
110 return glxim.QueryExtension(dpy, errorBase, eventBase);
111}
112
113DECLEXPORT(Bool) VBOXGLXENTRYTAG(glXIsDirect)(Display *dpy, GLXContext ctx)
114{
115 return glxim.IsDirect(dpy, ctx);
116}
117
118DECLEXPORT(GLXPixmap) VBOXGLXENTRYTAG(glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis, Pixmap pixmap)
119{
120 return glxim.CreateGLXPixmap(dpy, vis, pixmap);
121}
122
123DECLEXPORT(void) VBOXGLXENTRYTAG(glXSwapBuffers)(Display *dpy, GLXDrawable drawable)
124{
125 return glxim.SwapBuffers(dpy, drawable);
126}
127
128
129DECLEXPORT(GLXDrawable) VBOXGLXENTRYTAG(glXGetCurrentDrawable)(void)
130{
131 return glxim.GetCurrentDrawable();
132}
133
134DECLEXPORT(void) VBOXGLXENTRYTAG(glXWaitGL)(void)
135{
136 return glxim.WaitGL();
137}
138
139DECLEXPORT(Display *) VBOXGLXENTRYTAG(glXGetCurrentDisplay)(void)
140{
141 return glxim.GetCurrentDisplay();
142}
143
144DECLEXPORT(const char *) VBOXGLXENTRYTAG(glXQueryServerString)(Display *dpy, int screen, int name)
145{
146 return glxim.QueryServerString(dpy, screen, name);
147}
148
149DECLEXPORT(GLXContext) VBOXGLXENTRYTAG(glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext share, Bool direct)
150{
151 return glxim.CreateContext(dpy, vis, share, direct);
152}
153
154DECLEXPORT(int) VBOXGLXENTRYTAG(glXGetConfig)(Display *dpy, XVisualInfo *vis, int attrib, int *value)
155{
156 return glxim.GetConfig(dpy, vis, attrib, value);
157}
158
159DECLEXPORT(void) VBOXGLXENTRYTAG(glXWaitX)(void)
160{
161 return glxim.WaitX();
162}
163
164DECLEXPORT(GLXContext) VBOXGLXENTRYTAG(glXGetCurrentContext)(void)
165{
166 return glxim.GetCurrentContext();
167}
168
169DECLEXPORT(const char *) VBOXGLXENTRYTAG(glXGetClientString)(Display *dpy, int name)
170{
171 return glxim.GetClientString(dpy, name);
172}
173
174DECLEXPORT(Bool) VBOXGLXENTRYTAG(glXMakeCurrent)(Display *dpy, GLXDrawable drawable, GLXContext ctx)
175{
176 return glxim.MakeCurrent(dpy, drawable, ctx);
177}
178
179DECLEXPORT(void) VBOXGLXENTRYTAG(glXDestroyContext)(Display *dpy, GLXContext ctx)
180{
181 return glxim.DestroyContext(dpy, ctx);
182}
183
184DECLEXPORT(CR_GLXFuncPtr) VBOXGLXENTRYTAG(glXGetProcAddressARB)(const GLubyte *name)
185{
186 return glxim.GetProcAddressARB(name);
187}
188
189DECLEXPORT(void) VBOXGLXENTRYTAG(glXDestroyGLXPixmap)(Display *dpy, GLXPixmap pix)
190{
191 return glxim.DestroyGLXPixmap(dpy, pix);
192}
193
194DECLEXPORT(Bool) VBOXGLXENTRYTAG(glXQueryVersion)(Display *dpy, int *major, int *minor)
195{
196 return glxim.QueryVersion(dpy, major, minor);
197}
198
199DECLEXPORT(XVisualInfo *) VBOXGLXENTRYTAG(glXChooseVisual)(Display *dpy, int screen, int *attribList)
200{
201 return glxim.ChooseVisual(dpy, screen, attribList);
202}
203
204DECLEXPORT(const char *) VBOXGLXENTRYTAG(glXQueryExtensionsString)(Display *dpy, int screen)
205{
206 return glxim.QueryExtensionsString(dpy, screen);
207}
208
209#if GLX_EXTRAS
210DECLEXPORT(GLXPbufferSGIX) VBOXGLXENTRYTAG(glXCreateGLXPbufferSGIX)
211(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list)
212{
213 return glxim.CreateGLXPbufferSGIX(dpy, config, width, height, attrib_list);
214}
215
216DECLEXPORT(int) VBOXGLXENTRYTAG(glXQueryGLXPbufferSGIX)
217(Display *dpy, GLXPbuffer pbuf, int attribute, unsigned int *value)
218{
219 return glxim.QueryGLXPbufferSGIX(dpy, pbuf, attribute, value);
220}
221
222DECLEXPORT(GLXFBConfigSGIX *) VBOXGLXENTRYTAG(glXChooseFBConfigSGIX)
223(Display *dpy, int screen, int *attrib_list, int *nelements)
224{
225 return glxim.ChooseFBConfigSGIX(dpy, screen, attrib_list, nelements);
226}
227
228DECLEXPORT(void) VBOXGLXENTRYTAG(glXDestroyGLXPbufferSGIX)(Display *dpy, GLXPbuffer pbuf)
229{
230 return glxim.DestroyGLXPbufferSGIX(dpy, pbuf);
231}
232
233DECLEXPORT(void) VBOXGLXENTRYTAG(glXSelectEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long mask)
234{
235 return glxim.SelectEventSGIX(dpy, drawable, mask);
236}
237
238DECLEXPORT(void) VBOXGLXENTRYTAG(glXGetSelectedEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long *mask)
239{
240 return glxim.GetSelectedEventSGIX(dpy, drawable, mask);
241}
242
243DECLEXPORT(GLXFBConfigSGIX) VBOXGLXENTRYTAG(glXGetFBConfigFromVisualSGIX)(Display *dpy, XVisualInfo *vis)
244{
245 return glxim.GetFBConfigFromVisualSGIX(dpy, vis);
246}
247
248DECLEXPORT(XVisualInfo *) VBOXGLXENTRYTAG(glXGetVisualFromFBConfigSGIX)(Display *dpy, GLXFBConfig config)
249{
250 return glxim.GetVisualFromFBConfigSGIX(dpy, config);
251}
252
253DECLEXPORT(GLXContext) VBOXGLXENTRYTAG(glXCreateContextWithConfigSGIX)
254(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
255{
256 return glxim.CreateContextWithConfigSGIX(dpy, config, render_type, share_list, direct);
257}
258
259DECLEXPORT(GLXPixmap) VBOXGLXENTRYTAG(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy, GLXFBConfig config, Pixmap pixmap)
260{
261 return glxim.CreateGLXPixmapWithConfigSGIX(dpy, config, pixmap);
262}
263
264DECLEXPORT(int) VBOXGLXENTRYTAG(glXGetFBConfigAttribSGIX)(Display *dpy, GLXFBConfig config, int attribute, int *value)
265{
266 return glxim.GetFBConfigAttribSGIX(dpy, config, attribute, value);
267}
268
269
270/*
271 * GLX 1.3 functions
272 */
273DECLEXPORT(GLXFBConfig *) VBOXGLXENTRYTAG(glXChooseFBConfig)(Display *dpy, int screen, ATTRIB_TYPE *attrib_list, int *nelements)
274{
275 return glxim.ChooseFBConfig(dpy, screen, attrib_list, nelements);
276}
277
278DECLEXPORT(GLXPbuffer) VBOXGLXENTRYTAG(glXCreatePbuffer)(Display *dpy, GLXFBConfig config, ATTRIB_TYPE *attrib_list)
279{
280 return glxim.CreatePbuffer(dpy, config, attrib_list);
281}
282
283DECLEXPORT(GLXPixmap) VBOXGLXENTRYTAG(glXCreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const ATTRIB_TYPE *attrib_list)
284{
285 return glxim.CreatePixmap(dpy, config, pixmap, attrib_list);
286}
287
288DECLEXPORT(GLXWindow) VBOXGLXENTRYTAG(glXCreateWindow)(Display *dpy, GLXFBConfig config, Window win, ATTRIB_TYPE *attrib_list)
289{
290 return glxim.CreateWindow(dpy, config, win, attrib_list);
291}
292
293
294DECLEXPORT(GLXContext) VBOXGLXENTRYTAG(glXCreateNewContext)
295(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
296{
297 return glxim.CreateNewContext(dpy, config, render_type, share_list, direct);
298}
299
300DECLEXPORT(void) VBOXGLXENTRYTAG(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf)
301{
302 return glxim.DestroyPbuffer(dpy, pbuf);
303}
304
305DECLEXPORT(void) VBOXGLXENTRYTAG(glXDestroyPixmap)(Display *dpy, GLXPixmap pixmap)
306{
307 return glxim.DestroyPixmap(dpy, pixmap);
308}
309
310DECLEXPORT(void) VBOXGLXENTRYTAG(glXDestroyWindow)(Display *dpy, GLXWindow win)
311{
312 return glxim.DestroyWindow(dpy, win);
313}
314
315DECLEXPORT(GLXDrawable) VBOXGLXENTRYTAG(glXGetCurrentReadDrawable)(void)
316{
317 return glxim.GetCurrentReadDrawable();
318}
319
320DECLEXPORT(int) VBOXGLXENTRYTAG(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig config, int attribute, int *value)
321{
322 return glxim.GetFBConfigAttrib(dpy, config, attribute, value);
323}
324
325DECLEXPORT(GLXFBConfig *) VBOXGLXENTRYTAG(glXGetFBConfigs)(Display *dpy, int screen, int *nelements)
326{
327 return glxim.GetFBConfigs(dpy, screen, nelements);
328}
329
330DECLEXPORT(void) VBOXGLXENTRYTAG(glXGetSelectedEvent)(Display *dpy, GLXDrawable draw, unsigned long *event_mask)
331{
332 return glxim.GetSelectedEvent(dpy, draw, event_mask);
333}
334
335DECLEXPORT(XVisualInfo *) VBOXGLXENTRYTAG(glXGetVisualFromFBConfig)(Display *dpy, GLXFBConfig config)
336{
337 return glxim.GetVisualFromFBConfig(dpy, config);
338}
339
340DECLEXPORT(Bool) VBOXGLXENTRYTAG(glXMakeContextCurrent)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
341{
342 return glxim.MakeContextCurrent(display, draw, read, ctx);
343}
344
345DECLEXPORT(int) VBOXGLXENTRYTAG(glXQueryContext)(Display *dpy, GLXContext ctx, int attribute, int *value)
346{
347 return glxim.QueryContext(dpy, ctx, attribute, value);
348}
349
350DECLEXPORT(void) VBOXGLXENTRYTAG(glXQueryDrawable)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
351{
352 return glxim.QueryDrawable(dpy, draw, attribute, value);
353}
354
355DECLEXPORT(void) VBOXGLXENTRYTAG(glXSelectEvent)(Display *dpy, GLXDrawable draw, unsigned long event_mask)
356{
357 return glxim.SelectEvent(dpy, draw, event_mask);
358}
359
360/*
361#ifdef CR_EXT_texture_from_pixmap
362DECLEXPORT(void) VBOXGLXENTRYTAG(glXBindTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list)
363{
364 return glxim.BindTexImageEXT(dpy, draw, buffer, attrib_list);
365}
366
367DECLEXPORT(void) VBOXGLXENTRYTAG(glXReleaseTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer)
368{
369 return glxim.ReleaseTexImageEXT(dpy, draw, buffer);
370}
371#endif
372*/
373
374#endif /* GLX_EXTRAS */
375
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette