VirtualBox

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

Last change on this file since 20509 was 18549, checked in by vboxsync, 16 years ago

crOpenGL: more compile fixes for solaris

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