VirtualBox

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

Last change on this file since 50981 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

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