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 |
|
---|
7 | #ifndef CR_RENDERSPU_H
|
---|
8 | #define CR_RENDERSPU_H
|
---|
9 |
|
---|
10 | #ifdef WINDOWS
|
---|
11 | #define WIN32_LEAN_AND_MEAN
|
---|
12 | #include <iprt/win/windows.h>
|
---|
13 | #define RENDER_APIENTRY __stdcall
|
---|
14 | #define snprintf _snprintf
|
---|
15 | #elif defined(DARWIN)
|
---|
16 | # include "renderspu_cocoa_helper.h"
|
---|
17 | #define RENDER_APIENTRY
|
---|
18 | #else
|
---|
19 | #include <GL/glx.h>
|
---|
20 | #define RENDER_APIENTRY
|
---|
21 | #endif
|
---|
22 | #include "cr_threads.h"
|
---|
23 | #include "cr_spu.h"
|
---|
24 | #include "cr_hash.h"
|
---|
25 | #include "cr_server.h"
|
---|
26 | #include "cr_blitter.h"
|
---|
27 | #include "cr_compositor.h"
|
---|
28 |
|
---|
29 | #include <iprt/cdefs.h>
|
---|
30 | #include <iprt/critsect.h>
|
---|
31 | #if defined(GLX) /* @todo: unify windows and glx thread creation code */
|
---|
32 | #include <iprt/thread.h>
|
---|
33 | #include <iprt/semaphore.h>
|
---|
34 |
|
---|
35 | /* special window id used for representing the command window CRWindowInfo */
|
---|
36 | #define CR_RENDER_WINCMD_ID (INT32_MAX-2)
|
---|
37 | AssertCompile(CR_RENDER_WINCMD_ID != CR_RENDER_DEFAULT_WINDOW_ID);
|
---|
38 | /* CRHashTable is using unsigned long keys, we use it to trore X Window -> CRWindowInfo association */
|
---|
39 | AssertCompile(sizeof (Window) == sizeof (unsigned long));
|
---|
40 | #endif
|
---|
41 |
|
---|
42 |
|
---|
43 | #define MAX_VISUALS 32
|
---|
44 |
|
---|
45 | /**
|
---|
46 | * Visual info
|
---|
47 | */
|
---|
48 | typedef struct {
|
---|
49 | GLbitfield visAttribs;
|
---|
50 | const char *displayName;
|
---|
51 | #if defined(WINDOWS)
|
---|
52 | // HDC device_context;
|
---|
53 | #elif defined(DARWIN)
|
---|
54 | #elif defined(GLX)
|
---|
55 | Display *dpy;
|
---|
56 | XVisualInfo *visual;
|
---|
57 | #ifdef GLX_VERSION_1_3
|
---|
58 | GLXFBConfig fbconfig;
|
---|
59 | #endif /* GLX_VERSION_1_3 */
|
---|
60 | #endif
|
---|
61 | } VisualInfo;
|
---|
62 |
|
---|
63 | /**
|
---|
64 | * Window info
|
---|
65 | */
|
---|
66 | typedef struct WindowInfo {
|
---|
67 | int x, y;
|
---|
68 | // int width, height;
|
---|
69 | // int id; /**< integer window ID */
|
---|
70 | CR_BLITTER_WINDOW BltInfo;
|
---|
71 |
|
---|
72 | VisualInfo *visual;
|
---|
73 |
|
---|
74 | volatile uint32_t cRefs;
|
---|
75 |
|
---|
76 | GLboolean mapPending;
|
---|
77 | GLboolean visible;
|
---|
78 | GLboolean everCurrent; /**< has this window ever been bound? */
|
---|
79 | char *title;
|
---|
80 |
|
---|
81 | const VBOXVR_SCR_COMPOSITOR *pCompositor;
|
---|
82 | /* the composotor lock is used to synchronize the current compositor access,
|
---|
83 | * i.e. the compositor can be accessed by a gui refraw thread,
|
---|
84 | * while chromium thread might try to set a new compositor
|
---|
85 | * note that the compositor internally has its own lock to be used for accessing its data
|
---|
86 | * see CrVrScrCompositorLock/Unlock; renderspu and crserverlib would use it for compositor data access */
|
---|
87 | RTCRITSECT CompositorLock;
|
---|
88 | PCR_BLITTER pBlitter;
|
---|
89 | #if defined(WINDOWS)
|
---|
90 | HDC nativeWindow; /**< for render_to_app_window */
|
---|
91 | HWND hWnd;
|
---|
92 | HDC device_context;
|
---|
93 | HDC redraw_device_context;
|
---|
94 | HRGN hRgn;
|
---|
95 | #elif defined(DARWIN)
|
---|
96 | NativeNSViewRef window;
|
---|
97 | NativeNSViewRef nativeWindow; /**< for render_to_app_window */
|
---|
98 | NativeNSOpenGLContextRef *currentCtx;
|
---|
99 | #elif defined(GLX)
|
---|
100 | Window window;
|
---|
101 | Window nativeWindow; /**< for render_to_app_window */
|
---|
102 | Window appWindow; /**< Same as nativeWindow but for garbage collections purposes */
|
---|
103 | #endif
|
---|
104 | int nvSwapGroup;
|
---|
105 |
|
---|
106 | } WindowInfo;
|
---|
107 |
|
---|
108 | /**
|
---|
109 | * Context Info
|
---|
110 | */
|
---|
111 | typedef struct _ContextInfo {
|
---|
112 | // int id; /**< integer context ID */
|
---|
113 | CR_BLITTER_CONTEXT BltInfo;
|
---|
114 | VisualInfo *visual;
|
---|
115 | GLboolean everCurrent;
|
---|
116 | GLboolean haveWindowPosARB;
|
---|
117 | WindowInfo *currentWindow;
|
---|
118 | #if defined(WINDOWS)
|
---|
119 | HGLRC hRC;
|
---|
120 | #elif defined(DARWIN)
|
---|
121 | NativeNSOpenGLContextRef context;
|
---|
122 | #elif defined(GLX)
|
---|
123 | GLXContext context;
|
---|
124 | #endif
|
---|
125 | struct _ContextInfo *shared;
|
---|
126 | char *extensionString;
|
---|
127 | volatile uint32_t cRefs;
|
---|
128 | } ContextInfo;
|
---|
129 |
|
---|
130 | /**
|
---|
131 | * Barrier info
|
---|
132 | */
|
---|
133 | typedef struct {
|
---|
134 | CRbarrier barrier;
|
---|
135 | GLuint count;
|
---|
136 | } Barrier;
|
---|
137 |
|
---|
138 | #ifdef GLX
|
---|
139 | typedef enum
|
---|
140 | {
|
---|
141 | CR_RENDER_WINCMD_TYPE_UNDEFINED = 0,
|
---|
142 | /* create the window (not used for now) */
|
---|
143 | CR_RENDER_WINCMD_TYPE_WIN_CREATE,
|
---|
144 | /* destroy the window (not used for now) */
|
---|
145 | CR_RENDER_WINCMD_TYPE_WIN_DESTROY,
|
---|
146 | /* notify the WinCmd thread about window creation */
|
---|
147 | CR_RENDER_WINCMD_TYPE_WIN_ON_CREATE,
|
---|
148 | /* notify the WinCmd thread about window destroy */
|
---|
149 | CR_RENDER_WINCMD_TYPE_WIN_ON_DESTROY,
|
---|
150 | /* nop used to synchronize with the WinCmd thread */
|
---|
151 | CR_RENDER_WINCMD_TYPE_NOP,
|
---|
152 | /* exit Win Cmd thread */
|
---|
153 | CR_RENDER_WINCMD_TYPE_EXIT,
|
---|
154 | } CR_RENDER_WINCMD_TYPE;
|
---|
155 |
|
---|
156 | typedef struct CR_RENDER_WINCMD
|
---|
157 | {
|
---|
158 | /* command type */
|
---|
159 | CR_RENDER_WINCMD_TYPE enmCmd;
|
---|
160 | /* command result */
|
---|
161 | int rc;
|
---|
162 | /* valid for WIN_CREATE & WIN_DESTROY only */
|
---|
163 | WindowInfo *pWindow;
|
---|
164 | } CR_RENDER_WINCMD, *PCR_RENDER_WINCMD;
|
---|
165 | #endif
|
---|
166 |
|
---|
167 | #ifdef RT_OS_DARWIN
|
---|
168 | typedef void (*PFNDELETE_OBJECT)(GLhandleARB obj);
|
---|
169 | typedef void (*PFNGET_ATTACHED_OBJECTS)( GLhandleARB containerObj, GLsizei maxCount, GLsizei * count, GLhandleARB * obj );
|
---|
170 | typedef GLhandleARB (*PFNGET_HANDLE)(GLenum pname);
|
---|
171 | typedef void (*PFNGET_INFO_LOG)( GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog );
|
---|
172 | typedef void (*PFNGET_OBJECT_PARAMETERFV)( GLhandleARB obj, GLenum pname, GLfloat * params );
|
---|
173 | typedef void (*PFNGET_OBJECT_PARAMETERIV)( GLhandleARB obj, GLenum pname, GLint * params );
|
---|
174 | #endif
|
---|
175 |
|
---|
176 | typedef DECLCALLBACKPTR(void, PFNVCRSERVER_CLIENT_CALLOUT_CB)(void *pvCb);
|
---|
177 | typedef DECLCALLBACKPTR(void, PFNVCRSERVER_CLIENT_CALLOUT)(PFNVCRSERVER_CLIENT_CALLOUT_CB pfnCb, void*pvCb);
|
---|
178 |
|
---|
179 |
|
---|
180 | /**
|
---|
181 | * Renderspu state info
|
---|
182 | */
|
---|
183 | typedef struct {
|
---|
184 | SPUDispatchTable self;
|
---|
185 | int id;
|
---|
186 |
|
---|
187 | /** config options */
|
---|
188 | /*@{*/
|
---|
189 | char *window_title;
|
---|
190 | int defaultX, defaultY;
|
---|
191 | unsigned int defaultWidth, defaultHeight;
|
---|
192 | int default_visual;
|
---|
193 | int use_L2;
|
---|
194 | int fullscreen, ontop;
|
---|
195 | char display_string[100];
|
---|
196 | #if defined(GLX)
|
---|
197 | int try_direct;
|
---|
198 | int force_direct;
|
---|
199 | int sync;
|
---|
200 | #endif
|
---|
201 | int force_present_main_thread;
|
---|
202 | int render_to_app_window;
|
---|
203 | int render_to_crut_window;
|
---|
204 | int crut_drawable;
|
---|
205 | int resizable;
|
---|
206 | int use_lut8, lut8[3][256];
|
---|
207 | int borderless;
|
---|
208 | int nvSwapGroup;
|
---|
209 | int ignore_papi;
|
---|
210 | int ignore_window_moves;
|
---|
211 | int pbufferWidth, pbufferHeight;
|
---|
212 | int use_glxchoosevisual;
|
---|
213 | int draw_bbox;
|
---|
214 | /*@}*/
|
---|
215 |
|
---|
216 | CRServer *server;
|
---|
217 | int gather_port;
|
---|
218 | int gather_userbuf_size;
|
---|
219 | CRConnection **gather_conns;
|
---|
220 |
|
---|
221 | GLint drawCursor;
|
---|
222 | GLint cursorX, cursorY;
|
---|
223 |
|
---|
224 | int numVisuals;
|
---|
225 | VisualInfo visuals[MAX_VISUALS];
|
---|
226 |
|
---|
227 | CRHashTable *windowTable;
|
---|
228 | CRHashTable *contextTable;
|
---|
229 |
|
---|
230 | CRHashTable *dummyWindowTable;
|
---|
231 |
|
---|
232 | ContextInfo *defaultSharedContext;
|
---|
233 |
|
---|
234 | crOpenGLInterface ws; /**< Window System interface */
|
---|
235 |
|
---|
236 | CRHashTable *barrierHash;
|
---|
237 |
|
---|
238 | int num_swap_clients;
|
---|
239 | CRConnection **swap_conns;
|
---|
240 |
|
---|
241 | SPUDispatchTable blitterDispatch;
|
---|
242 | CRHashTable *blitterTable;
|
---|
243 |
|
---|
244 | PFNVCRSERVER_CLIENT_CALLOUT pfnClientCallout;
|
---|
245 |
|
---|
246 | #if defined(GLX)
|
---|
247 | RTTHREAD hWinCmdThread;
|
---|
248 | VisualInfo WinCmdVisual;
|
---|
249 | WindowInfo WinCmdWindow;
|
---|
250 | RTSEMEVENT hWinCmdCompleteEvent;
|
---|
251 | /* display connection used to send data to the WinCmd thread */
|
---|
252 | Display *pCommunicationDisplay;
|
---|
253 | Atom WinCmdAtom;
|
---|
254 | /* X Window -> CRWindowInfo table */
|
---|
255 | CRHashTable *pWinToInfoTable;
|
---|
256 | #endif
|
---|
257 |
|
---|
258 | #ifdef RT_OS_WINDOWS
|
---|
259 | DWORD dwWinThreadId;
|
---|
260 | HANDLE hWinThreadReadyEvent;
|
---|
261 | #endif
|
---|
262 |
|
---|
263 | #ifdef RT_OS_DARWIN
|
---|
264 | PFNDELETE_OBJECT pfnDeleteObject;
|
---|
265 | PFNGET_ATTACHED_OBJECTS pfnGetAttachedObjects;
|
---|
266 | PFNGET_HANDLE pfnGetHandle;
|
---|
267 | PFNGET_INFO_LOG pfnGetInfoLog;
|
---|
268 | PFNGET_OBJECT_PARAMETERFV pfnGetObjectParameterfv;
|
---|
269 | PFNGET_OBJECT_PARAMETERIV pfnGetObjectParameteriv;
|
---|
270 |
|
---|
271 | CR_GLSL_CACHE GlobalShaders;
|
---|
272 | #endif /* RT_OS_DARWIN */
|
---|
273 | /* If TRUE, render should tell window server to prevent artificial content
|
---|
274 | * up-scaling when displayed on HiDPI monitor. */
|
---|
275 | bool fUnscaledHiDPI;
|
---|
276 | } RenderSPU;
|
---|
277 |
|
---|
278 | #ifdef RT_OS_WINDOWS
|
---|
279 |
|
---|
280 | /* Asks window thread to create new window.
|
---|
281 | msg.lParam - holds pointer to CREATESTRUCT structure
|
---|
282 | note that lpCreateParams is used to specify address to store handle of created window
|
---|
283 | msg.wParam - unused, should be NULL
|
---|
284 | */
|
---|
285 | #define WM_VBOX_RENDERSPU_CREATE_WINDOW (WM_APP+1)
|
---|
286 |
|
---|
287 | typedef struct _VBOX_RENDERSPU_DESTROY_WINDOW {
|
---|
288 | HWND hWnd; /* handle to window to destroy */
|
---|
289 | } VBOX_RENDERSPU_DESTROY_WINDOW;
|
---|
290 |
|
---|
291 | /* Asks window thread to destroy previously created window.
|
---|
292 | msg.lParam - holds pointer to RENDERSPU_VBOX_WINDOW_DESTROY structure
|
---|
293 | msg.wParam - unused, should be NULL
|
---|
294 | */
|
---|
295 | #define WM_VBOX_RENDERSPU_DESTROY_WINDOW (WM_APP+2)
|
---|
296 |
|
---|
297 | #endif
|
---|
298 |
|
---|
299 | extern RenderSPU render_spu;
|
---|
300 |
|
---|
301 | /* @todo remove this hack */
|
---|
302 | extern uint64_t render_spu_parent_window_id;
|
---|
303 |
|
---|
304 | extern CRtsd _RenderTSD;
|
---|
305 | #define GET_CONTEXT_VAL() ((ContextInfo *) crGetTSD(&_RenderTSD))
|
---|
306 | #define SET_CONTEXT_VAL(_v) do { \
|
---|
307 | crSetTSD(&_RenderTSD, (_v)); \
|
---|
308 | } while (0)
|
---|
309 |
|
---|
310 | #define GET_CONTEXT(T) ContextInfo *T = GET_CONTEXT_VAL()
|
---|
311 |
|
---|
312 |
|
---|
313 | extern void renderspuSetDefaultSharedContext(ContextInfo *pCtx);
|
---|
314 | extern void renderspuSetVBoxConfiguration( RenderSPU *spu );
|
---|
315 | extern void renderspuMakeVisString( GLbitfield visAttribs, char *s );
|
---|
316 | extern VisualInfo *renderspuFindVisual(const char *displayName, GLbitfield visAttribs );
|
---|
317 | extern GLboolean renderspu_SystemInitVisual( VisualInfo *visual );
|
---|
318 | extern GLboolean renderspu_SystemCreateContext( VisualInfo *visual, ContextInfo *context, ContextInfo *sharedContext );
|
---|
319 | extern void renderspu_SystemDestroyContext( ContextInfo *context );
|
---|
320 | extern GLboolean renderspu_SystemCreateWindow( VisualInfo *visual, GLboolean showIt, WindowInfo *window );
|
---|
321 | extern GLboolean renderspu_SystemVBoxCreateWindow( VisualInfo *visual, GLboolean showIt, WindowInfo *window );
|
---|
322 | extern void renderspu_SystemDestroyWindow( WindowInfo *window );
|
---|
323 | extern void renderspu_SystemWindowSize( WindowInfo *window, GLint w, GLint h );
|
---|
324 | extern void renderspu_SystemGetWindowGeometry( WindowInfo *window, GLint *x, GLint *y, GLint *w, GLint *h );
|
---|
325 | extern void renderspu_SystemGetMaxWindowSize( WindowInfo *window, GLint *w, GLint *h );
|
---|
326 | extern void renderspu_SystemWindowPosition( WindowInfo *window, GLint x, GLint y );
|
---|
327 | extern void renderspu_SystemWindowVisibleRegion(WindowInfo *window, GLint cRects, const GLint* pRects);
|
---|
328 | extern GLboolean renderspu_SystemWindowNeedEmptyPresent(WindowInfo *window);
|
---|
329 | extern int renderspu_SystemInit(void);
|
---|
330 | extern int renderspu_SystemTerm(void);
|
---|
331 | extern void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext);
|
---|
332 | extern void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt );
|
---|
333 | extern void renderspu_SystemMakeCurrent( WindowInfo *window, GLint windowInfor, ContextInfo *context );
|
---|
334 | extern void renderspu_SystemSwapBuffers( WindowInfo *window, GLint flags );
|
---|
335 | extern void renderspu_SystemReparentWindow(WindowInfo *window);
|
---|
336 | extern void renderspu_SystemVBoxPresentComposition( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry );
|
---|
337 | uint32_t renderspu_SystemPostprocessFunctions(SPUNamedFunctionTable *aFunctions, uint32_t cFunctions, uint32_t cTable);
|
---|
338 | extern void renderspu_GCWindow(void);
|
---|
339 | extern int renderspuCreateFunctions( SPUNamedFunctionTable table[] );
|
---|
340 | extern GLboolean renderspuVBoxCompositorSet( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor);
|
---|
341 | extern void renderspuVBoxCompositorClearAll(void);
|
---|
342 | extern int renderspuVBoxCompositorLock(WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR **ppCompositor);
|
---|
343 | extern int renderspuVBoxCompositorUnlock(WindowInfo *window);
|
---|
344 | extern const struct VBOXVR_SCR_COMPOSITOR * renderspuVBoxCompositorAcquire( WindowInfo *window);
|
---|
345 | extern int renderspuVBoxCompositorTryAcquire(WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR **ppCompositor);
|
---|
346 | extern void renderspuVBoxCompositorRelease( WindowInfo *window);
|
---|
347 | extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor,
|
---|
348 | const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData,
|
---|
349 | bool fRedraw);
|
---|
350 | extern PCR_BLITTER renderspuVBoxPresentBlitterGet( WindowInfo *window );
|
---|
351 | void renderspuVBoxPresentBlitterCleanup( WindowInfo *window );
|
---|
352 | extern int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter, int32_t i32MakeCurrentUserData );
|
---|
353 | extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData, bool fRedraw );
|
---|
354 | extern PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window, int32_t i32MakeCurrentUserData );
|
---|
355 | WindowInfo* renderspuWinCreate(GLint visBits, GLint id);
|
---|
356 | void renderspuWinTermOnShutdown(WindowInfo *window);
|
---|
357 | void renderspuWinTerm( WindowInfo *window );
|
---|
358 | void renderspuWinCleanup(WindowInfo *window);
|
---|
359 | void renderspuWinDestroy(WindowInfo *window);
|
---|
360 | GLboolean renderspuWinInitWithVisual( WindowInfo *window, VisualInfo *visual, GLboolean showIt, GLint id );
|
---|
361 | GLboolean renderspuWinInit(WindowInfo *pWindow, const char *dpyName, GLint visBits, GLint id);
|
---|
362 |
|
---|
363 | DECLINLINE(void) renderspuWinRetain(WindowInfo *window)
|
---|
364 | {
|
---|
365 | ASMAtomicIncU32(&window->cRefs);
|
---|
366 | }
|
---|
367 |
|
---|
368 | DECLINLINE(bool) renderspuWinIsTermed(WindowInfo *window)
|
---|
369 | {
|
---|
370 | return window->BltInfo.Base.id < 0;
|
---|
371 | }
|
---|
372 |
|
---|
373 | DECLINLINE(void) renderspuWinRelease(WindowInfo *window)
|
---|
374 | {
|
---|
375 | uint32_t cRefs = ASMAtomicDecU32(&window->cRefs);
|
---|
376 | if (!cRefs)
|
---|
377 | {
|
---|
378 | renderspuWinDestroy(window);
|
---|
379 | }
|
---|
380 | }
|
---|
381 |
|
---|
382 | extern WindowInfo* renderspuGetDummyWindow(GLint visBits);
|
---|
383 | extern void renderspuPerformMakeCurrent(WindowInfo *window, GLint nativeWindow, ContextInfo *context);
|
---|
384 | extern GLboolean renderspuInitVisual(VisualInfo *pVisInfo, const char *displayName, GLbitfield visAttribs);
|
---|
385 | extern void renderspuVBoxCompositorBlit ( const struct VBOXVR_SCR_COMPOSITOR * pCompositor, PCR_BLITTER pBlitter);
|
---|
386 | extern void renderspuVBoxCompositorBlitStretched ( const struct VBOXVR_SCR_COMPOSITOR * pCompositor, PCR_BLITTER pBlitter, GLfloat scaleX, GLfloat scaleY);
|
---|
387 | extern GLint renderspuCreateContextEx(const char *dpyName, GLint visBits, GLint id, GLint shareCtx);
|
---|
388 | extern GLint renderspuWindowCreateEx( const char *dpyName, GLint visBits, GLint id );
|
---|
389 |
|
---|
390 | extern GLint RENDER_APIENTRY renderspuWindowCreate( const char *dpyName, GLint visBits );
|
---|
391 | void RENDER_APIENTRY renderspuWindowDestroy( GLint win );
|
---|
392 | extern GLint RENDER_APIENTRY renderspuCreateContext( const char *dpyname, GLint visBits, GLint shareCtx );
|
---|
393 | extern void RENDER_APIENTRY renderspuMakeCurrent(GLint crWindow, GLint nativeWindow, GLint ctx);
|
---|
394 | extern void RENDER_APIENTRY renderspuSwapBuffers( GLint window, GLint flags );
|
---|
395 |
|
---|
396 | extern uint32_t renderspuContextMarkDeletedAndRelease( ContextInfo *context );
|
---|
397 |
|
---|
398 | int renderspuDefaultCtxInit(void);
|
---|
399 | void renderspuCleanupBase(bool fDeleteTables);
|
---|
400 |
|
---|
401 | ContextInfo * renderspuDefaultSharedContextAcquire(void);
|
---|
402 | void renderspuDefaultSharedContextRelease(ContextInfo * pCtx);
|
---|
403 | uint32_t renderspuContextRelease(ContextInfo *context);
|
---|
404 | uint32_t renderspuContextRetain(ContextInfo *context);
|
---|
405 |
|
---|
406 | bool renderspuCalloutAvailable(void);
|
---|
407 | bool renderspuCalloutClient(PFNVCRSERVER_CLIENT_CALLOUT_CB pfnCb, void *pvCb);
|
---|
408 |
|
---|
409 |
|
---|
410 | #ifdef __cplusplus
|
---|
411 | extern "C" {
|
---|
412 | #endif
|
---|
413 | DECLHIDDEN(void) renderspuSetWindowId(uint64_t winId);
|
---|
414 | DECLEXPORT(void) renderspuReparentWindow(GLint window);
|
---|
415 | DECLEXPORT(void) renderspuSetUnscaledHiDPI(bool fEnable);
|
---|
416 | #ifdef __cplusplus
|
---|
417 | }
|
---|
418 | #endif
|
---|
419 |
|
---|
420 | #endif /* CR_RENDERSPU_H */
|
---|