VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/cr_spu.h@ 79107

Last change on this file since 79107 was 78408, checked in by vboxsync, 6 years ago

Additions,GuestHost/OpenGL,HostServices/SharedOpenGL: Get rid of the individual SPU shared libraries and merge them into the VBoxSharedCrOpenGL shared libraries on the host and VBoxOGL{,-x86} shared libraries for the guest additions, bugref:9435

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 18.1 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved.
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6#ifndef CR_SPU_H
7#define CR_SPU_H
8
9#ifdef WINDOWS
10#define SPULOAD_APIENTRY __stdcall
11#else
12#define SPULOAD_APIENTRY
13#endif
14
15#include "cr_dll.h"
16#include "spu_dispatch_table.h"
17#include "cr_net.h"
18
19#include <iprt/types.h>
20
21#ifdef DARWIN
22# include <OpenGL/OpenGL.h>
23#endif
24
25#define SPU_ENTRY_POINT_NAME "SPULoad"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#define MAX_THREADS 32 /**< max threads per spu */
32
33typedef struct _SPUSTRUCT SPU;
34
35typedef void (*SPUGenericFunction)(void);
36
37/**
38 * SPU Named function descriptor
39 */
40typedef struct {
41 char *name;
42 SPUGenericFunction fn;
43} SPUNamedFunctionTable;
44
45/**
46 * SPU function table descriptor
47 */
48typedef struct {
49 SPUDispatchTable *childCopy;
50 void *data;
51 SPUNamedFunctionTable *table;
52} SPUFunctions;
53
54/** Init spu */
55typedef SPUFunctions *(*SPUInitFuncPtr)(int id, SPU *child,
56 SPU *super, unsigned int, unsigned int );
57typedef void (*SPUSelfDispatchFuncPtr)(SPUDispatchTable *);
58/** Cleanup spu */
59typedef int (*SPUCleanupFuncPtr)(void);
60/** Load spu */
61typedef int (*SPULoadFunction)(char **, char **, void *, void *, void *, int *);
62
63
64/**
65 * masks for spu_flags
66 */
67#define SPU_PACKER_MASK 0x1
68#define SPU_NO_PACKER 0x0
69#define SPU_HAS_PACKER 0x1
70#define SPU_TERMINAL_MASK 0x2
71#define SPU_NOT_TERMINAL 0x0
72#define SPU_IS_TERMINAL 0x2
73#define SPU_MAX_SERVERS_MASK 0xc
74#define SPU_MAX_SERVERS_ZERO 0x0
75#define SPU_MAX_SERVERS_ONE 0x4
76#define SPU_MAX_SERVERS_UNLIMITED 0x8
77
78/**
79 * SPU registration restructure.
80 */
81typedef struct SPUREG
82{
83 /** SPU name. */
84 const char *pszName;
85 /** Name of the SPU super class. */
86 const char *pszSuperName;
87 /** SPU flags. */
88 uint32_t fFlags;
89 /** Init function. */
90 SPUInitFuncPtr pfnInit;
91 /** Dispatch function. */
92 SPUSelfDispatchFuncPtr pfnDispatch;
93 /** Cleanup function. */
94 SPUCleanupFuncPtr pfnCleanup;
95} SPUREG;
96/** Pointer to a SPU registration structure. */
97typedef SPUREG *PSPUREG;
98/** Pointer to a const SPU registration structure. */
99typedef const SPUREG *PCSPUREG;
100
101/**
102 * SPU descriptor
103 */
104struct _SPUSTRUCT {
105 char *name; /**< Name of the spu */
106 char *super_name; /**< Name of the super class of the spu */
107 int id; /**< Id num of the spu */
108 int spu_flags; /**< options fags for the SPU */
109 struct _SPUSTRUCT *superSPU; /**< Pointer to the descriptor for the super class */
110 CRDLL *dll; /**< pointer to shared lib for spu */
111 SPULoadFunction entry_point; /**< SPU's entry point (SPULoad()) */
112 SPUInitFuncPtr init; /**< SPU init function */
113 SPUSelfDispatchFuncPtr self; /**< */
114 SPUCleanupFuncPtr cleanup; /**< SPU cleanup func */
115 SPUFunctions *function_table; /**< Function table for spu */
116 SPUDispatchTable dispatch_table;
117 void *privatePtr; /**< pointer to SPU-private data */
118};
119
120
121/**
122 * These are the OpenGL / window system interface functions
123 */
124#if defined(WINDOWS)
125/**
126 * Windows/WGL
127 */
128/*@{*/
129typedef HGLRC (WGL_APIENTRY *wglCreateContextFunc_t)(HDC);
130typedef void (WGL_APIENTRY *wglDeleteContextFunc_t)(HGLRC);
131typedef BOOL (WGL_APIENTRY *wglShareListsFunc_t)(HGLRC,HGLRC);
132typedef BOOL (WGL_APIENTRY *wglMakeCurrentFunc_t)(HDC,HGLRC);
133typedef BOOL (WGL_APIENTRY *wglSwapBuffersFunc_t)(HDC);
134typedef int (WGL_APIENTRY *wglChoosePixelFormatFunc_t)(HDC, CONST PIXELFORMATDESCRIPTOR *);
135typedef BOOL (WGL_APIENTRY *wglChoosePixelFormatEXTFunc_t)(HDC, const int *, const FLOAT *, UINT, int *, UINT *);
136typedef int (WGL_APIENTRY *wglDescribePixelFormatFunc_t)(HDC, int, UINT, CONST PIXELFORMATDESCRIPTOR *);
137typedef int (WGL_APIENTRY *wglSetPixelFormatFunc_t)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
138typedef HGLRC (WGL_APIENTRY *wglGetCurrentContextFunc_t)(void);
139typedef PROC (WGL_APIENTRY *wglGetProcAddressFunc_t)(LPCSTR Arg1);
140typedef BOOL (WGL_APIENTRY *wglChoosePixelFormatEXTFunc_t)(HDC, const int *, const FLOAT *, UINT, int *, UINT *);
141typedef BOOL (WGL_APIENTRY *wglGetPixelFormatAttribivEXTFunc_t)(HDC, int, int, UINT, int *, int *);
142typedef BOOL (WGL_APIENTRY *wglGetPixelFormatAttribfvEXTFunc_t)(HDC, int, int, UINT, int *, float *);
143typedef const GLubyte *(WGL_APIENTRY *glGetStringFunc_t)( GLenum );
144typedef const GLubyte *(WGL_APIENTRY *wglGetExtensionsStringEXTFunc_t)(void);
145typedef const GLubyte *(WGL_APIENTRY *wglGetExtensionsStringARBFunc_t)(HDC);
146/*@}*/
147#elif defined(DARWIN)
148typedef const GLubyte *(*glGetStringFunc_t)( GLenum );
149/*@}*/
150
151/**
152 * Apple/CGL
153 */
154/*@{*/
155typedef CGLError (*CGLSetCurrentContextFunc_t)( CGLContextObj );
156typedef CGLContextObj (*CGLGetCurrentContextFunc_t)();
157
158typedef CGLError (*CGLChoosePixelFormatFunc_t)( const CGLPixelFormatAttribute *, CGLPixelFormatObj *, long * );
159typedef CGLError (*CGLDestroyPixelFormatFunc_t)( CGLPixelFormatObj );
160typedef CGLError (*CGLDescribePixelFormatFunc_t)( CGLPixelFormatObj , long , CGLPixelFormatAttribute , long * );
161
162typedef CGLError (*CGLQueryRendererInfoFunc_t)( unsigned long, CGLRendererInfoObj *, long * );
163typedef CGLError (*CGLDestroyRendererInfoFunc_t)( CGLRendererInfoObj );
164typedef CGLError (*CGLDescribeRendererFunc_t)( CGLRendererInfoObj, long, CGLRendererProperty, long * );
165
166typedef CGLError (*CGLCreateContextFunc_t)( CGLPixelFormatObj, CGLContextObj, CGLContextObj * );
167typedef CGLError (*CGLDestroyContextFunc_t)( CGLContextObj );
168typedef CGLError (*CGLCopyContextFunc_t)( CGLContextObj src, CGLContextObj, unsigned long );
169
170typedef CGLError (*CGLCreatePBufferFunc_t)( long, long, unsigned long, unsigned long, long, CGLPBufferObj * ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
171typedef CGLError (*CGLDestroyPBufferFunc_t)( CGLPBufferObj ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
172typedef CGLError (*CGLDescribePBufferFunc_t)( CGLPBufferObj, long *, long *, unsigned long *, unsigned long *, long * ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
173typedef CGLError (*CGLTexImagePBufferFunc_t)( CGLContextObj, CGLPBufferObj, unsigned long ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
174
175typedef CGLError (*CGLSetOffScreenFunc_t)( CGLContextObj, long, long, long, void * );
176typedef CGLError (*CGLGetOffScreenFunc_t)( CGLContextObj, long *, long *, long *, void ** );
177typedef CGLError (*CGLSetFullScreenFunc_t)( CGLContextObj );
178
179typedef CGLError (*CGLSetPBufferFunc_t)( CGLContextObj, CGLPBufferObj, unsigned long, long, long ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
180typedef CGLError (*CGLGetPBufferFunc_t)( CGLContextObj, CGLPBufferObj *, unsigned long *, long *, long * ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
181
182typedef CGLError (*CGLClearDrawableFunc_t)( CGLContextObj );
183typedef CGLError (*CGLFlushDrawableFunc_t)( CGLContextObj ); /* <-- swap buffers */
184
185typedef CGLError (*CGLEnableFunc_t)( CGLContextObj, CGLContextEnable );
186typedef CGLError (*CGLDisableFunc_t)( CGLContextObj, CGLContextEnable );
187typedef CGLError (*CGLIsEnabledFunc_t)( CGLContextObj, CGLContextEnable, long * );
188
189typedef CGLError (*CGLSetParameterFunc_t)( CGLContextObj, CGLContextParameter, const long * );
190typedef CGLError (*CGLGetParameterFunc_t)( CGLContextObj, CGLContextParameter, long * );
191
192typedef CGLError (*CGLSetVirtualScreenFunc_t)( CGLContextObj, long );
193typedef CGLError (*CGLGetVirtualScreenFunc_t)( CGLContextObj, long *);
194
195typedef CGLError (*CGLSetOptionFunc_t)( CGLGlobalOption, long );
196typedef CGLError (*CGLGetOptionFunc_t)( CGLGlobalOption, long * );
197typedef void (*CGLGetVersionFunc_t)( long *, long * );
198
199typedef const char * (*CGLErrorStringFunc_t)( CGLError );
200
201/** XXX \todo Undocumented CGL functions. Are these all correct? */
202typedef void *CGSConnectionID;
203typedef int CGSWindowID;
204typedef int CGSSurfaceID;
205
206typedef CGLError (*CGLSetSurfaceFunc_t)( CGLContextObj, CGSConnectionID, CGSWindowID, CGSSurfaceID );
207typedef CGLError (*CGLGetSurfaceFunc_t)( CGLContextObj, CGSConnectionID, CGSWindowID, CGSSurfaceID* );
208typedef CGLError (*CGLUpdateContextFunc_t)( CGLContextObj );
209/*@}*/
210#else
211/**
212 * X11/GLX
213 */
214/*@{*/
215typedef int (*glXGetConfigFunc_t)( Display *, XVisualInfo *, int, int * );
216typedef Bool (*glXQueryExtensionFunc_t) (Display *, int *, int * );
217typedef const char *(*glXQueryExtensionsStringFunc_t) (Display *, int );
218typedef Bool (*glXQueryVersionFunc_t)( Display *dpy, int *maj, int *min );
219typedef XVisualInfo *(*glXChooseVisualFunc_t)( Display *, int, int * );
220typedef GLXContext (*glXCreateContextFunc_t)( Display *, XVisualInfo *, GLXContext, Bool );
221typedef void (*glXUseXFontFunc_t)(Font font, int first, int count, int listBase);
222typedef void (*glXDestroyContextFunc_t)( Display *, GLXContext );
223typedef Bool (*glXIsDirectFunc_t)( Display *, GLXContext );
224typedef Bool (*glXMakeCurrentFunc_t)( Display *, GLXDrawable, GLXContext );
225typedef void (*glXSwapBuffersFunc_t)( Display *, GLXDrawable );
226typedef CR_GLXFuncPtr (*glXGetProcAddressARBFunc_t)( const GLubyte *name );
227typedef Display *(*glXGetCurrentDisplayFunc_t)( void );
228typedef GLXContext (*glXGetCurrentContextFunc_t)( void );
229typedef GLXDrawable (*glXGetCurrentDrawableFunc_t)( void );
230typedef char * (*glXGetClientStringFunc_t)( Display *dpy, int name );
231typedef void (*glXWaitGLFunc_t)(void);
232typedef void (*glXWaitXFunc_t)(void);
233typedef void (*glXCopyContextFunc_t)(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask );
234typedef const GLubyte *(*glGetStringFunc_t)( GLenum );
235typedef Bool (*glXJoinSwapGroupNVFunc_t)(Display *dpy, GLXDrawable drawable, GLuint group);
236typedef Bool (*glXBindSwapBarrierNVFunc_t)(Display *dpy, GLuint group, GLuint barrier);
237typedef Bool (*glXQuerySwapGroupNVFunc_t)(Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
238typedef Bool (*glXQueryMaxSwapGroupsNVFunc_t)(Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
239typedef Bool (*glXQueryFrameCountNVFunc_t)(Display *dpy, int screen, GLuint *count);
240typedef Bool (*glXResetFrameCountNVFunc_t)(Display *dpy, int screen);
241#ifdef GLX_VERSION_1_3
242typedef GLXContext (*glXCreateNewContextFunc_t)( Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct );
243typedef GLXWindow (*glXCreateWindowFunc_t)(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
244typedef Bool (*glXMakeContextCurrentFunc_t)( Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx );
245typedef GLXFBConfig *(*glXChooseFBConfigFunc_t)( Display *dpy, int screen, const int *attribList, int *nitems );
246typedef GLXFBConfig *(*glXGetFBConfigsFunc_t)(Display *dpy, int screen, int *nelements);
247typedef int (*glXGetFBConfigAttribFunc_t)(Display *dpy, GLXFBConfig config, int attribute, int *value);
248typedef XVisualInfo *(*glXGetVisualFromFBConfigFunc_t)(Display *dpy, GLXFBConfig config);
249typedef GLXPbuffer (*glXCreatePbufferFunc_t)( Display *dpy, GLXFBConfig config, const int *attribList );
250typedef void (*glXDestroyPbufferFunc_t)( Display *dpy, GLXPbuffer pbuf );
251typedef int (*glXQueryContextFunc_t)(Display *dpy, GLXContext ctx, int attribute, int *value);
252typedef void (*glXQueryDrawableFunc_t)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
253#endif /* GLX_VERSION_1_3 */
254/*@}*/
255#endif
256
257
258/**
259 * Package up the WGL/AGL/CGL/GLX function pointers into a struct. We use
260 * this in a few different places.
261 */
262typedef struct {
263#if defined(WINDOWS)
264 wglGetProcAddressFunc_t wglGetProcAddress;
265 wglCreateContextFunc_t wglCreateContext;
266 wglDeleteContextFunc_t wglDeleteContext;
267 wglShareListsFunc_t wglShareLists;
268 wglMakeCurrentFunc_t wglMakeCurrent;
269 wglSwapBuffersFunc_t wglSwapBuffers;
270 wglGetCurrentContextFunc_t wglGetCurrentContext;
271 wglChoosePixelFormatFunc_t wglChoosePixelFormat;
272 wglDescribePixelFormatFunc_t wglDescribePixelFormat;
273 wglSetPixelFormatFunc_t wglSetPixelFormat;
274 wglChoosePixelFormatEXTFunc_t wglChoosePixelFormatEXT;
275 wglGetPixelFormatAttribivEXTFunc_t wglGetPixelFormatAttribivEXT;
276 wglGetPixelFormatAttribfvEXTFunc_t wglGetPixelFormatAttribfvEXT;
277 wglGetExtensionsStringEXTFunc_t wglGetExtensionsStringEXT;
278#elif defined(DARWIN)
279 CGLChoosePixelFormatFunc_t CGLChoosePixelFormat;
280 CGLDestroyPixelFormatFunc_t CGLDestroyPixelFormat;
281 CGLDescribePixelFormatFunc_t CGLDescribePixelFormat;
282 CGLQueryRendererInfoFunc_t CGLQueryRendererInfo;
283 CGLDestroyRendererInfoFunc_t CGLDestroyRendererInfo;
284 CGLDescribeRendererFunc_t CGLDescribeRenderer;
285 CGLCreateContextFunc_t CGLCreateContext;
286 CGLDestroyContextFunc_t CGLDestroyContext;
287 CGLCopyContextFunc_t CGLCopyContext;
288 CGLSetCurrentContextFunc_t CGLSetCurrentContext;
289 CGLGetCurrentContextFunc_t CGLGetCurrentContext;
290 CGLCreatePBufferFunc_t CGLCreatePBuffer;
291 CGLDestroyPBufferFunc_t CGLDestroyPBuffer;
292 CGLDescribePBufferFunc_t CGLDescribePBuffer;
293 CGLTexImagePBufferFunc_t CGLTexImagePBuffer;
294 CGLSetOffScreenFunc_t CGLSetOffScreen;
295 CGLGetOffScreenFunc_t CGLGetOffScreen;
296 CGLSetFullScreenFunc_t CGLSetFullScreen;
297 CGLSetPBufferFunc_t CGLSetPBuffer;
298 CGLGetPBufferFunc_t CGLGetPBuffer;
299 CGLClearDrawableFunc_t CGLClearDrawable;
300 CGLFlushDrawableFunc_t CGLFlushDrawable;
301 CGLEnableFunc_t CGLEnable;
302 CGLDisableFunc_t CGLDisable;
303 CGLIsEnabledFunc_t CGLIsEnabled;
304 CGLSetParameterFunc_t CGLSetParameter;
305 CGLGetParameterFunc_t CGLGetParameter;
306 CGLSetVirtualScreenFunc_t CGLSetVirtualScreen;
307 CGLGetVirtualScreenFunc_t CGLGetVirtualScreen;
308 CGLSetOptionFunc_t CGLSetOption;
309 CGLGetOptionFunc_t CGLGetOption;
310 CGLGetVersionFunc_t CGLGetVersion;
311 CGLErrorStringFunc_t CGLErrorString;
312
313 CGLSetSurfaceFunc_t CGLSetSurface;
314 CGLGetSurfaceFunc_t CGLGetSurface;
315 CGLUpdateContextFunc_t CGLUpdateContext;
316#else
317 glXGetConfigFunc_t glXGetConfig;
318 glXQueryExtensionFunc_t glXQueryExtension;
319 glXQueryVersionFunc_t glXQueryVersion;
320 glXQueryExtensionsStringFunc_t glXQueryExtensionsString;
321 glXChooseVisualFunc_t glXChooseVisual;
322 glXCreateContextFunc_t glXCreateContext;
323 glXDestroyContextFunc_t glXDestroyContext;
324 glXUseXFontFunc_t glXUseXFont;
325 glXIsDirectFunc_t glXIsDirect;
326 glXMakeCurrentFunc_t glXMakeCurrent;
327 glXSwapBuffersFunc_t glXSwapBuffers;
328 glXGetProcAddressARBFunc_t glXGetProcAddressARB;
329 glXGetCurrentDisplayFunc_t glXGetCurrentDisplay;
330 glXGetCurrentContextFunc_t glXGetCurrentContext;
331 glXGetCurrentDrawableFunc_t glXGetCurrentDrawable;
332 glXGetClientStringFunc_t glXGetClientString;
333 glXWaitGLFunc_t glXWaitGL;
334 glXWaitXFunc_t glXWaitX;
335 glXCopyContextFunc_t glXCopyContext;
336 /* GLX_NV_swap_group */
337 glXJoinSwapGroupNVFunc_t glXJoinSwapGroupNV;
338 glXBindSwapBarrierNVFunc_t glXBindSwapBarrierNV;
339 glXQuerySwapGroupNVFunc_t glXQuerySwapGroupNV;
340 glXQueryMaxSwapGroupsNVFunc_t glXQueryMaxSwapGroupsNV;
341 glXQueryFrameCountNVFunc_t glXQueryFrameCountNV;
342 glXResetFrameCountNVFunc_t glXResetFrameCountNV;
343#ifdef GLX_VERSION_1_3
344 glXCreateNewContextFunc_t glXCreateNewContext;
345 glXCreateWindowFunc_t glXCreateWindow;
346 glXMakeContextCurrentFunc_t glXMakeContextCurrent;
347 glXChooseFBConfigFunc_t glXChooseFBConfig;
348 glXGetFBConfigsFunc_t glXGetFBConfigs;
349 glXGetFBConfigAttribFunc_t glXGetFBConfigAttrib;
350 glXGetVisualFromFBConfigFunc_t glXGetVisualFromFBConfig;
351 glXCreatePbufferFunc_t glXCreatePbuffer;
352 glXDestroyPbufferFunc_t glXDestroyPbuffer;
353 glXQueryContextFunc_t glXQueryContext;
354 glXQueryDrawableFunc_t glXQueryDrawable;
355#endif
356#endif
357 glGetStringFunc_t glGetString;
358} crOpenGLInterface;
359
360
361/** This is the one required function in _all_ SPUs */
362DECLEXPORT(int) SPULoad( char **name, char **super, SPUInitFuncPtr *init,
363 SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
364 int *flags );
365
366DECLEXPORT(SPU *) crSPULoad( SPU *child, int id, char *name, char *dir, void *server);
367DECLEXPORT(SPU *) crSPULoadChain( int count, int *ids, char **names, char *dir, void *server );
368DECLEXPORT(void) crSPUUnloadChain(SPU *headSPU);
369
370DECLEXPORT(SPU *) crSPUInitFromReg(SPU *pSpuChild, int iId, const char *pszName, void *pvServer, PCSPUREG *papSpuReg);
371DECLEXPORT(SPU *) crSPUInitChainFromReg(int cSpus, int *paIds, const char * const *papszNames, void *server, PCSPUREG *papSpuReg);
372
373DECLEXPORT(void) crSPUInitDispatchTable( SPUDispatchTable *table );
374DECLEXPORT(void) crSPUCopyDispatchTable( SPUDispatchTable *dst, SPUDispatchTable *src );
375DECLEXPORT(void) crSPUChangeInterface( SPUDispatchTable *table, void *origFunc, void *newFunc );
376
377
378DECLEXPORT(SPUGenericFunction) crSPUFindFunction( const SPUNamedFunctionTable *table, const char *fname );
379DECLEXPORT(void) crSPUInitDispatch( SPUDispatchTable *dispatch, const SPUNamedFunctionTable *table );
380DECLEXPORT(void) crSPUInitDispatchNops(SPUDispatchTable *table);
381
382DECLEXPORT(int) crLoadOpenGL( crOpenGLInterface *crInterface, SPUNamedFunctionTable table[] );
383DECLEXPORT(void) crUnloadOpenGL( void );
384DECLEXPORT(int) crLoadOpenGLExtensions( const crOpenGLInterface *crInterface, SPUNamedFunctionTable table[] );
385DECLEXPORT(void) crSPUChangeDispatch(SPUDispatchTable *dispatch, const SPUNamedFunctionTable *newtable);
386
387#if defined(GLX)
388DECLEXPORT(XVisualInfo *)
389crChooseVisual(const crOpenGLInterface *ws, Display *dpy, int screen,
390 GLboolean directColor, int visBits);
391#else
392DECLEXPORT(int)
393crChooseVisual(const crOpenGLInterface *ws, int visBits);
394#endif
395
396
397#ifdef USE_OSMESA
398DECLEXPORT(int)
399crLoadOSMesa( OSMesaContext (**createContext)( GLenum format, OSMesaContext sharelist ),
400 GLboolean (**makeCurrent)( OSMesaContext ctx, GLubyte *buffer,
401 GLenum type, GLsizei width, GLsizei height ),
402 void (**destroyContext)( OSMesaContext ctx ));
403#endif
404
405extern DECLHIDDEN(const SPUREG) g_ErrorSpuReg;
406#ifdef IN_GUEST
407extern DECLHIDDEN(const SPUREG) g_FeedbackSpuReg;
408extern DECLHIDDEN(const SPUREG) g_PassthroughSpuReg;
409extern DECLHIDDEN(const SPUREG) g_PackSpuReg;
410#else
411extern DECLHIDDEN(const SPUREG) g_RenderSpuReg;
412#endif
413
414#ifdef __cplusplus
415}
416#endif
417
418#endif /* CR_SPU_H */
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