1 | /* $Id$ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox guest OpenGL DRI header
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
10 | *
|
---|
11 | * Sun Microsystems, Inc. confidential
|
---|
12 | * All rights reserved
|
---|
13 | */
|
---|
14 |
|
---|
15 | #ifndef ___CROPENGL_FAKEDRIDRV_H
|
---|
16 | #define ___CROPENGL_FAKEDRIDRV_H
|
---|
17 |
|
---|
18 | #include "src/mesa/main/mtypes.h"
|
---|
19 | #include "src/mesa/main/dd.h"
|
---|
20 | #include "src/mesa/glapi/dispatch.h"
|
---|
21 | #include "src/mesa/glapi/glapi.h"
|
---|
22 | #include "src/mesa/glapi/glapitable.h"
|
---|
23 | #include "src/mesa/glapi/glapioffsets.h"
|
---|
24 | #include "src/mesa/drivers/dri/common/dri_util.h"
|
---|
25 | #include "GL/internal/dri_interface.h"
|
---|
26 |
|
---|
27 | #include "glx_proto.h"
|
---|
28 |
|
---|
29 | #ifdef VBOX_OGL_GLX_USE_CSTUBS
|
---|
30 | # include "dri_glx.h"
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | typedef struct _vbox_glxapi_table
|
---|
34 | {
|
---|
35 | #define GLXAPI_ENTRY(Func) PGLXFUNC_##Func Func;
|
---|
36 | #include "fakedri_glxfuncsList.h"
|
---|
37 | #undef GLXAPI_ENTRY
|
---|
38 | } fakedri_glxapi_table;
|
---|
39 |
|
---|
40 | extern fakedri_glxapi_table glxim;
|
---|
41 |
|
---|
42 | #ifdef VBOX_OGL_GLX_USE_CSTUBS
|
---|
43 | /* Extern declarations for our C stubs */
|
---|
44 | extern void VBOXGLXENTRYTAG(glXFreeMemoryMESA)(Display *dpy, int scrn, void *pointer) ;
|
---|
45 | extern GLXContext VBOXGLXENTRYTAG(glXImportContextEXT)(Display *dpy, GLXContextID contextID) ;
|
---|
46 | extern GLXContextID VBOXGLXENTRYTAG(glXGetContextIDEXT)(const GLXContext ctx) ;
|
---|
47 | extern Bool VBOXGLXENTRYTAG(glXMakeCurrentReadSGI)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx) ;
|
---|
48 | extern Display * VBOXGLXENTRYTAG(glXGetCurrentDisplayEXT)(void) ;
|
---|
49 | extern void VBOXGLXENTRYTAG(glXFreeContextEXT)(Display *dpy, GLXContext ctx) ;
|
---|
50 | extern int VBOXGLXENTRYTAG(glXQueryContextInfoEXT)(Display *dpy, GLXContext ctx) ;
|
---|
51 | extern void * VBOXGLXENTRYTAG(glXAllocateMemoryMESA)(Display *dpy, int scrn,
|
---|
52 | size_t size, float readFreq,
|
---|
53 | float writeFreq, float priority);
|
---|
54 | extern GLuint VBOXGLXENTRYTAG(glXGetMemoryOffsetMESA)(Display *dpy, int scrn, const void *pointer ) ;
|
---|
55 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreateGLXPixmapMESA)(Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap) ;
|
---|
56 | extern void VBOXGLXENTRYTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, unsigned long mask);
|
---|
57 | extern void VBOXGLXENTRYTAG(glXUseXFont)(Font font, int first, int count, int listBase) ;
|
---|
58 | extern CR_GLXFuncPtr VBOXGLXENTRYTAG(glXGetProcAddress)(const GLubyte *name) ;
|
---|
59 | extern Bool VBOXGLXENTRYTAG(glXQueryExtension)(Display *dpy, int *errorBase, int *eventBase) ;
|
---|
60 | extern Bool VBOXGLXENTRYTAG(glXIsDirect)(Display *dpy, GLXContext ctx) ;
|
---|
61 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis, Pixmap pixmap) ;
|
---|
62 | extern void VBOXGLXENTRYTAG(glXSwapBuffers)(Display *dpy, GLXDrawable drawable) ;
|
---|
63 | extern GLXDrawable VBOXGLXENTRYTAG(glXGetCurrentDrawable)(void) ;
|
---|
64 | extern void VBOXGLXENTRYTAG(glXWaitGL)(void) ;
|
---|
65 | extern Display * VBOXGLXENTRYTAG(glXGetCurrentDisplay)(void) ;
|
---|
66 | extern const char * VBOXGLXENTRYTAG(glXQueryServerString)(Display *dpy, int screen, int name) ;
|
---|
67 | extern GLXContext VBOXGLXENTRYTAG(glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext share, Bool direct) ;
|
---|
68 | extern int VBOXGLXENTRYTAG(glXGetConfig)(Display *dpy, XVisualInfo *vis, int attrib, int *value) ;
|
---|
69 | extern void VBOXGLXENTRYTAG(glXWaitX)(void) ;
|
---|
70 | extern GLXContext VBOXGLXENTRYTAG(glXGetCurrentContext)(void) ;
|
---|
71 | extern const char * VBOXGLXENTRYTAG(glXGetClientString)(Display *dpy, int name) ;
|
---|
72 | extern Bool VBOXGLXENTRYTAG(glXMakeCurrent)(Display *dpy, GLXDrawable drawable, GLXContext ctx) ;
|
---|
73 | extern void VBOXGLXENTRYTAG(glXDestroyContext)(Display *dpy, GLXContext ctx) ;
|
---|
74 | extern CR_GLXFuncPtr VBOXGLXENTRYTAG(glXGetProcAddressARB)(const GLubyte *name) ;
|
---|
75 | extern void VBOXGLXENTRYTAG(glXDestroyGLXPixmap)(Display *dpy, GLXPixmap pix) ;
|
---|
76 | extern Bool VBOXGLXENTRYTAG(glXQueryVersion)(Display *dpy, int *major, int *minor) ;
|
---|
77 | extern XVisualInfo * VBOXGLXENTRYTAG(glXChooseVisual)(Display *dpy, int screen, int *attribList) ;
|
---|
78 | extern const char * VBOXGLXENTRYTAG(glXQueryExtensionsString)(Display *dpy, int screen) ;
|
---|
79 | extern GLXPbufferSGIX VBOXGLXENTRYTAG(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
---|
80 | extern int VBOXGLXENTRYTAG(glXQueryGLXPbufferSGIX)(Display *dpy, GLXPbuffer pbuf, int attribute, unsigned int *value);
|
---|
81 | extern GLXFBConfigSGIX * VBOXGLXENTRYTAG(glXChooseFBConfigSGIX)(Display *dpy, int screen, int *attrib_list, int *nelements);
|
---|
82 | extern void VBOXGLXENTRYTAG(glXDestroyGLXPbufferSGIX)(Display *dpy, GLXPbuffer pbuf) ;
|
---|
83 | extern void VBOXGLXENTRYTAG(glXSelectEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long mask) ;
|
---|
84 | extern void VBOXGLXENTRYTAG(glXGetSelectedEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long *mask) ;
|
---|
85 | extern GLXFBConfigSGIX VBOXGLXENTRYTAG(glXGetFBConfigFromVisualSGIX)(Display *dpy, XVisualInfo *vis) ;
|
---|
86 | extern XVisualInfo * VBOXGLXENTRYTAG(glXGetVisualFromFBConfigSGIX)(Display *dpy, GLXFBConfig config) ;
|
---|
87 | extern GLXContext VBOXGLXENTRYTAG(glXCreateContextWithConfigSGIX)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
---|
88 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy, GLXFBConfig config, Pixmap pixmap) ;
|
---|
89 | extern int VBOXGLXENTRYTAG(glXGetFBConfigAttribSGIX)(Display *dpy, GLXFBConfig config, int attribute, int *value) ;
|
---|
90 | extern GLXFBConfig * VBOXGLXENTRYTAG(glXChooseFBConfig)(Display *dpy, int screen, ATTRIB_TYPE *attrib_list, int *nelements) ;
|
---|
91 | extern GLXPbuffer VBOXGLXENTRYTAG(glXCreatePbuffer)(Display *dpy, GLXFBConfig config, ATTRIB_TYPE *attrib_list) ;
|
---|
92 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const ATTRIB_TYPE *attrib_list) ;
|
---|
93 | extern GLXWindow VBOXGLXENTRYTAG(glXCreateWindow)(Display *dpy, GLXFBConfig config, Window win, ATTRIB_TYPE *attrib_list) ;
|
---|
94 | extern GLXContext VBOXGLXENTRYTAG(glXCreateNewContext)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
---|
95 | extern void VBOXGLXENTRYTAG(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf) ;
|
---|
96 | extern void VBOXGLXENTRYTAG(glXDestroyPixmap)(Display *dpy, GLXPixmap pixmap) ;
|
---|
97 | extern void VBOXGLXENTRYTAG(glXDestroyWindow)(Display *dpy, GLXWindow win) ;
|
---|
98 | extern GLXDrawable VBOXGLXENTRYTAG(glXGetCurrentReadDrawable)(void) ;
|
---|
99 | extern int VBOXGLXENTRYTAG(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig config, int attribute, int *value) ;
|
---|
100 | extern GLXFBConfig * VBOXGLXENTRYTAG(glXGetFBConfigs)(Display *dpy, int screen, int *nelements) ;
|
---|
101 | extern void VBOXGLXENTRYTAG(glXGetSelectedEvent)(Display *dpy, GLXDrawable draw, unsigned long *event_mask) ;
|
---|
102 | extern XVisualInfo * VBOXGLXENTRYTAG(glXGetVisualFromFBConfig)(Display *dpy, GLXFBConfig config) ;
|
---|
103 | extern Bool VBOXGLXENTRYTAG(glXMakeContextCurrent)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx) ;
|
---|
104 | extern int VBOXGLXENTRYTAG(glXQueryContext)(Display *dpy, GLXContext ctx, int attribute, int *value) ;
|
---|
105 | extern void VBOXGLXENTRYTAG(glXQueryDrawable)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) ;
|
---|
106 | extern void VBOXGLXENTRYTAG(glXSelectEvent)(Display *dpy, GLXDrawable draw, unsigned long event_mask) ;
|
---|
107 | #else
|
---|
108 | /* Extern declarations for our asm stubs */
|
---|
109 | # define GLXAPI_ENTRY(Func) \
|
---|
110 | extern void vbox_glX##Func;\
|
---|
111 | extern void vbox_glX##Func##_EndProc;
|
---|
112 | # include "fakedri_glxfuncsList.h"
|
---|
113 | # undef GLXAPI_ENTRY
|
---|
114 | #endif
|
---|
115 |
|
---|
116 | #endif /* ___CROPENGL_FAKEDRIDRV_H */
|
---|
117 |
|
---|