VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c@ 44326

最後變更 在這個檔案從44326是 44326,由 vboxsync 提交於 12 年 前

crOpenGL: 1. stencil state fixes, 2. missing gets

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 20.0 KB
 
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#include "state.h"
8#include "cr_mem.h"
9#include "cr_error.h"
10#include "cr_spu.h"
11
12#ifdef CHROMIUM_THREADSAFE
13static bool __isContextTLSInited = false;
14CRtsd __contextTSD;
15#else
16CRContext *__currentContext = NULL;
17#endif
18
19CRStateBits *__currentBits = NULL;
20CRContext *g_pAvailableContexts[CR_MAX_CONTEXTS];
21uint32_t g_cContexts = 0;
22
23static CRSharedState *gSharedState=NULL;
24
25static CRContext *defaultContext = NULL;
26
27GLboolean g_bVBoxEnableDiffOnMakeCurrent = GL_TRUE;
28
29
30/**
31 * Allocate a new shared state object.
32 * Contains texture objects, display lists, etc.
33 */
34static CRSharedState *
35crStateAllocShared(void)
36{
37 CRSharedState *s = (CRSharedState *) crCalloc(sizeof(CRSharedState));
38 if (s) {
39 s->textureTable = crAllocHashtable();
40 s->dlistTable = crAllocHashtable();
41 s->buffersTable = crAllocHashtable();
42 s->fbTable = crAllocHashtable();
43 s->rbTable = crAllocHashtable();
44 s->refCount = 1; /* refcount is number of contexts using this state */
45 s->saveCount = 0;
46 }
47 return s;
48}
49
50
51
52/**
53 * Callback used for crFreeHashtable().
54 */
55DECLEXPORT(void)
56crStateDeleteTextureCallback(void *texObj)
57{
58#ifndef IN_GUEST
59 diff_api.DeleteTextures(1, &((CRTextureObj *)texObj)->hwid);
60#endif
61 crStateDeleteTextureObject((CRTextureObj *) texObj);
62}
63
64#ifndef IN_GUEST
65typedef struct CR_STATE_RELEASEOBJ
66{
67 CRContext *pCtx;
68 CRSharedState *s;
69} CR_STATE_RELEASEOBJ, *PCR_STATE_RELEASEOBJ;
70
71static void ReleaseTextureCallback(unsigned long key, void *data1, void *data2)
72{
73 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
74 CRTextureObj *pObj = (CRTextureObj *)data1;
75 CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pData->pCtx);
76 if (!CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj))
77 crHashtableDelete(pData->s->textureTable, key, crStateDeleteTextureCallback);
78}
79
80static void ReleaseBufferObjectCallback(unsigned long key, void *data1, void *data2)
81{
82 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
83 CRBufferObject *pObj = (CRBufferObject *)data1;
84 CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pData->pCtx);
85 if (!CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj))
86 crHashtableDelete(pData->s->buffersTable, key, crStateFreeBufferObject);
87}
88
89static void ReleaseFBOCallback(unsigned long key, void *data1, void *data2)
90{
91 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
92 CRFramebufferObject *pObj = (CRFramebufferObject *)data1;
93 CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pData->pCtx);
94 if (!CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj))
95 crHashtableDelete(pData->s->fbTable, key, crStateFreeFBO);
96}
97
98static void ReleaseRBOCallback(unsigned long key, void *data1, void *data2)
99{
100 PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
101 CRRenderbufferObject *pObj = (CRRenderbufferObject *)data1;
102 CR_STATE_SHAREDOBJ_USAGE_CLEAR(pObj, pData->pCtx);
103 if (!CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj))
104 crHashtableDelete(pData->s->rbTable, key, crStateFreeRBO);
105}
106#endif
107/**
108 * Decrement shared state's refcount and delete when it hits zero.
109 */
110DECLEXPORT(void)
111crStateFreeShared(CRContext *pContext, CRSharedState *s)
112{
113 s->refCount--;
114 if (s->refCount <= 0) {
115 if (s==gSharedState)
116 {
117 gSharedState = NULL;
118 }
119 crFreeHashtable(s->textureTable, crStateDeleteTextureCallback);
120 crFreeHashtable(s->dlistTable, crFree); /* call crFree for each entry */
121 crFreeHashtable(s->buffersTable, crStateFreeBufferObject);
122 crFreeHashtable(s->fbTable, crStateFreeFBO);
123 crFreeHashtable(s->rbTable, crStateFreeRBO);
124 crFree(s);
125 }
126#ifndef IN_GUEST
127 else
128 {
129 /* evaluate usage bits*/
130 CR_STATE_RELEASEOBJ CbData;
131 CbData.pCtx = pContext;
132 CbData.s = s;
133 crHashtableWalk(s->textureTable, ReleaseTextureCallback, &CbData);
134 crHashtableWalk(s->buffersTable, ReleaseBufferObjectCallback , &CbData);
135 crHashtableWalk(s->fbTable, ReleaseFBOCallback, &CbData);
136 crHashtableWalk(s->rbTable, ReleaseRBOCallback, &CbData);
137 }
138#endif
139}
140
141DECLEXPORT(void) STATE_APIENTRY
142crStateShareContext(GLboolean value)
143{
144 CRContext *pCtx = GetCurrentContext();
145 CRASSERT(pCtx && pCtx->shared);
146
147 if (value)
148 {
149 if (pCtx->shared == gSharedState)
150 {
151 return;
152 }
153
154 crDebug("Context(%i) shared", pCtx->id);
155
156 if (!gSharedState)
157 {
158 gSharedState = pCtx->shared;
159 }
160 else
161 {
162 crStateFreeShared(pCtx, pCtx->shared);
163 pCtx->shared = gSharedState;
164 gSharedState->refCount++;
165 }
166 }
167 else
168 {
169 if (pCtx->shared != gSharedState)
170 {
171 return;
172 }
173
174 crDebug("Context(%i) unshared", pCtx->id);
175
176 if (gSharedState->refCount==1)
177 {
178 gSharedState = NULL;
179 }
180 else
181 {
182 pCtx->shared = crStateAllocShared();
183 pCtx->shared->id = pCtx->id;
184 crStateFreeShared(pCtx, gSharedState);
185 }
186 }
187}
188
189DECLEXPORT(GLboolean) STATE_APIENTRY
190crStateContextIsShared(CRContext *pCtx)
191{
192 return pCtx->shared==gSharedState;
193}
194
195DECLEXPORT(void) STATE_APIENTRY
196crStateSetSharedContext(CRContext *pCtx)
197{
198 if (gSharedState)
199 {
200 crWarning("crStateSetSharedContext: shared is being changed from %p to %p", gSharedState, pCtx->shared);
201 }
202
203 gSharedState = pCtx->shared;
204}
205
206#ifdef CHROMIUM_THREADSAFE
207static void
208crStateFreeContext(CRContext *ctx);
209static DECLCALLBACK(void) crStateContextDtor(void *pvCtx)
210{
211 crStateFreeContext((CRContext*)pvCtx);
212}
213#endif
214
215/*
216 * Helper for crStateCreateContext, below.
217 */
218static CRContext *
219crStateCreateContextId(int i, const CRLimitsState *limits,
220 GLint visBits, CRContext *shareCtx)
221{
222 CRContext *ctx;
223 int j;
224 int node32 = i >> 5;
225 int node = i & 0x1f;
226
227 if (g_pAvailableContexts[i] != NULL)
228 {
229 crWarning("trying to create context with used id");
230 return NULL;
231 }
232
233 ctx = (CRContext *) crCalloc( sizeof( *ctx ) );
234 if (!ctx)
235 {
236 crWarning("failed to allocate context");
237 return NULL;
238 }
239 g_pAvailableContexts[i] = ctx;
240 ++g_cContexts;
241 CRASSERT(g_cContexts < RT_ELEMENTS(g_pAvailableContexts));
242 ctx->id = i;
243#ifdef CHROMIUM_THREADSAFE
244 VBoxTlsRefInit(ctx, crStateContextDtor);
245#endif
246 ctx->flush_func = NULL;
247 for (j=0;j<CR_MAX_BITARRAY;j++){
248 if (j == node32) {
249 ctx->bitid[j] = (1 << node);
250 } else {
251 ctx->bitid[j] = 0;
252 }
253 ctx->neg_bitid[j] = ~(ctx->bitid[j]);
254 }
255
256 if (shareCtx) {
257 CRASSERT(shareCtx->shared);
258 ctx->shared = shareCtx->shared;
259 ctx->shared->refCount ++;
260 }
261 else {
262 ctx->shared = crStateAllocShared();
263 ctx->shared->id = ctx->id;
264 }
265
266 /* use Chromium's OpenGL defaults */
267 crStateLimitsInit( &(ctx->limits) );
268 crStateExtensionsInit( &(ctx->limits), &(ctx->extensions) );
269
270 crStateBufferObjectInit( ctx ); /* must precede client state init! */
271 crStateClientInit( ctx );
272
273 crStateBufferInit( ctx );
274 crStateCurrentInit( ctx );
275 crStateEvaluatorInit( ctx );
276 crStateFogInit( ctx );
277 crStateHintInit( ctx );
278 crStateLightingInit( ctx );
279 crStateLineInit( ctx );
280 crStateListsInit( ctx );
281 crStateMultisampleInit( ctx );
282 crStateOcclusionInit( ctx );
283 crStatePixelInit( ctx );
284 crStatePolygonInit( ctx );
285 crStatePointInit( ctx );
286 crStateProgramInit( ctx );
287 crStateRegCombinerInit( ctx );
288 crStateStencilInit( ctx );
289 crStateTextureInit( ctx );
290 crStateTransformInit( ctx );
291 crStateViewportInit ( ctx );
292 crStateFramebufferObjectInit(ctx);
293 crStateGLSLInit(ctx);
294
295 /* This has to come last. */
296 crStateAttribInit( &(ctx->attrib) );
297
298 ctx->renderMode = GL_RENDER;
299
300 /* Initialize values that depend on the visual mode */
301 if (visBits & CR_DOUBLE_BIT) {
302 ctx->limits.doubleBuffer = GL_TRUE;
303 }
304 if (visBits & CR_RGB_BIT) {
305 ctx->limits.redBits = 8;
306 ctx->limits.greenBits = 8;
307 ctx->limits.blueBits = 8;
308 if (visBits & CR_ALPHA_BIT) {
309 ctx->limits.alphaBits = 8;
310 }
311 }
312 else {
313 ctx->limits.indexBits = 8;
314 }
315 if (visBits & CR_DEPTH_BIT) {
316 ctx->limits.depthBits = 24;
317 }
318 if (visBits & CR_STENCIL_BIT) {
319 ctx->limits.stencilBits = 8;
320 }
321 if (visBits & CR_ACCUM_BIT) {
322 ctx->limits.accumRedBits = 16;
323 ctx->limits.accumGreenBits = 16;
324 ctx->limits.accumBlueBits = 16;
325 if (visBits & CR_ALPHA_BIT) {
326 ctx->limits.accumAlphaBits = 16;
327 }
328 }
329 if (visBits & CR_STEREO_BIT) {
330 ctx->limits.stereo = GL_TRUE;
331 }
332 if (visBits & CR_MULTISAMPLE_BIT) {
333 ctx->limits.sampleBuffers = 1;
334 ctx->limits.samples = 4;
335 ctx->multisample.enabled = GL_TRUE;
336 }
337
338 if (visBits & CR_OVERLAY_BIT) {
339 ctx->limits.level = 1;
340 }
341
342 return ctx;
343}
344
345/*@todo crStateAttribDestroy*/
346static void
347crStateFreeContext(CRContext *ctx)
348{
349 CRASSERT(g_pAvailableContexts[ctx->id] == ctx);
350 if (g_pAvailableContexts[ctx->id] == ctx)
351 {
352 g_pAvailableContexts[ctx->id] = NULL;
353 --g_cContexts;
354 CRASSERT(g_cContexts < RT_ELEMENTS(g_pAvailableContexts));
355 }
356 else
357 {
358 crWarning("freeing context 0x%x, id(%d) not being in the context list", ctx, ctx->id);
359 }
360
361 crStateClientDestroy( ctx );
362 crStateLimitsDestroy( &(ctx->limits) );
363 crStateBufferObjectDestroy( ctx );
364 crStateEvaluatorDestroy( ctx );
365 crStateListsDestroy( ctx );
366 crStateLightingDestroy( ctx );
367 crStateOcclusionDestroy( ctx );
368 crStateProgramDestroy( ctx );
369 crStateTextureDestroy( ctx );
370 crStateTransformDestroy( ctx );
371 crStateFreeShared(ctx, ctx->shared);
372 crStateFramebufferObjectDestroy(ctx);
373 crStateGLSLDestroy(ctx);
374 if (ctx->buffer.pFrontImg) crFree(ctx->buffer.pFrontImg);
375 if (ctx->buffer.pBackImg) crFree(ctx->buffer.pBackImg);
376 crFree( ctx );
377}
378
379#ifdef CHROMIUM_THREADSAFE
380# ifndef RT_OS_WINDOWS
381static DECLCALLBACK(void) crStateThreadTlsDtor(void *pvValue)
382{
383 CRContext *pCtx = (CRContext*)pvValue;
384 VBoxTlsRefRelease(pCtx);
385}
386# endif
387#endif
388
389/*
390 * Allocate the state (dirty) bits data structures.
391 * This should be called before we create any contexts.
392 * We'll also create the default/NULL context at this time and make
393 * it the current context by default. This means that if someone
394 * tries to set GL state before calling MakeCurrent() they'll be
395 * modifying the default state object, and not segfaulting on a NULL
396 * pointer somewhere.
397 */
398void crStateInit(void)
399{
400 unsigned int i;
401
402 /* Purely initialize the context bits */
403 if (!__currentBits) {
404 __currentBits = (CRStateBits *) crCalloc( sizeof(CRStateBits) );
405 crStateClientInitBits( &(__currentBits->client) );
406 crStateLightingInitBits( &(__currentBits->lighting) );
407 } else
408 crWarning("State tracker is being re-initialized..\n");
409
410 for (i=0;i<CR_MAX_CONTEXTS;i++)
411 g_pAvailableContexts[i] = NULL;
412 g_cContexts = 0;
413
414#ifdef CHROMIUM_THREADSAFE
415 if (!__isContextTLSInited)
416 {
417# ifndef RT_OS_WINDOWS
418 /* tls destructor is implemented for all platforms except windows*/
419 crInitTSDF(&__contextTSD, crStateThreadTlsDtor);
420# else
421 /* windows should do cleanup via DllMain THREAD_DETACH notification */
422 crInitTSD(&__contextTSD);
423# endif
424 __isContextTLSInited = 1;
425 }
426#endif
427
428 if (defaultContext) {
429 /* Free the default/NULL context.
430 * Ensures context bits are reset */
431#ifdef CHROMIUM_THREADSAFE
432 SetCurrentContext(NULL);
433 VBoxTlsRefRelease(defaultContext);
434#else
435 crStateFreeContext(defaultContext);
436 __currentContext = NULL;
437#endif
438 }
439
440 /* Reset diff_api */
441 crMemZero(&diff_api, sizeof(SPUDispatchTable));
442
443 /* Allocate the default/NULL context */
444 CRASSERT(g_pAvailableContexts[0] == NULL);
445 defaultContext = crStateCreateContextId(0, NULL, CR_RGB_BIT, NULL);
446 CRASSERT(g_pAvailableContexts[0] == defaultContext);
447 CRASSERT(g_cContexts == 1);
448#ifdef CHROMIUM_THREADSAFE
449 SetCurrentContext(defaultContext);
450#else
451 __currentContext = defaultContext;
452#endif
453}
454
455void crStateDestroy(void)
456{
457 int i;
458 if (__currentBits)
459 {
460 crStateClientDestroyBits(&(__currentBits->client));
461 crStateLightingDestroyBits(&(__currentBits->lighting));
462 crFree(__currentBits);
463 __currentBits = NULL;
464 }
465
466 SetCurrentContext(NULL);
467
468 for (i = CR_MAX_CONTEXTS-1; i >= 0; i--)
469 {
470 if (g_pAvailableContexts[i])
471 {
472#ifdef CHROMIUM_THREADSAFE
473 if (VBoxTlsRefIsFunctional(g_pAvailableContexts[i]))
474 VBoxTlsRefRelease(g_pAvailableContexts[i]);
475#else
476 crStateFreeContext(g_pAvailableContexts[i]);
477#endif
478 }
479 }
480
481 /* default context was stored in g_pAvailableContexts[0], so it was destroyed already */
482 defaultContext = NULL;
483
484
485#ifdef CHROMIUM_THREADSAFE
486 crFreeTSD(&__contextTSD);
487 __isContextTLSInited = 0;
488#endif
489}
490
491/*
492 * Notes on context switching and the "default context".
493 *
494 * See the paper "Tracking Graphics State for Networked Rendering"
495 * by Ian Buck, Greg Humphries and Pat Hanrahan for background
496 * information about how the state tracker and context switching
497 * works.
498 *
499 * When we make a new context current, we call crStateSwitchContext()
500 * in order to transform the 'from' context into the 'to' context
501 * (i.e. the old context to the new context). The transformation
502 * is accomplished by calling GL functions through the 'diff_api'
503 * so that the downstream GL machine (represented by the __currentContext
504 * structure) is updated to reflect the new context state. Finally,
505 * we point __currentContext to the new context.
506 *
507 * A subtle problem we have to deal with is context destruction.
508 * This issue arose while testing with Glean. We found that when
509 * the currently bound context was getting destroyed that state
510 * tracking was incorrect when a subsequent new context was activated.
511 * In DestroyContext, the __hwcontext was being set to NULL and effectively
512 * going away. Later in MakeCurrent we had no idea what the state of the
513 * downstream GL machine was (since __hwcontext was gone). This meant
514 * we had nothing to 'diff' against and the downstream GL machine was
515 * in an unknown state.
516 *
517 * The solution to this problem is the "default/NULL" context. The
518 * default context is created the first time CreateContext is called
519 * and is never freed. Whenever we get a crStateMakeCurrent(NULL) call
520 * or destroy the currently bound context in crStateDestroyContext()
521 * we call crStateSwitchContext() to switch to the default context and
522 * then set the __currentContext pointer to point to the default context.
523 * This ensures that the dirty bits are updated and the diff_api functions
524 * are called to keep the downstream GL machine in a known state.
525 * Finally, the __hwcontext variable is no longer needed now.
526 *
527 * Yeah, this is kind of a mind-bender, but it really solves the problem
528 * pretty cleanly.
529 *
530 * -Brian
531 */
532
533
534CRContext *
535crStateCreateContext(const CRLimitsState *limits, GLint visBits, CRContext *share)
536{
537 return crStateCreateContextEx(limits, visBits, share, -1);
538}
539
540CRContext *
541crStateCreateContextEx(const CRLimitsState *limits, GLint visBits, CRContext *share, GLint presetID)
542{
543 /* Must have created the default context via crStateInit() first */
544 CRASSERT(defaultContext);
545
546 if (presetID>0)
547 {
548 if(g_pAvailableContexts[presetID])
549 {
550 crWarning("requesting to create context with already allocated id");
551 return NULL;
552 }
553 }
554 else
555 {
556 int i;
557
558 for (i = 1 ; i < CR_MAX_CONTEXTS ; i++)
559 {
560 if (!g_pAvailableContexts[i])
561 {
562 presetID = i;
563 break;
564 }
565 }
566
567 if (presetID<=0)
568 {
569 crError( "Out of available contexts in crStateCreateContexts (max %d)",
570 CR_MAX_CONTEXTS );
571 /* never get here */
572 return NULL;
573 }
574 }
575
576 return crStateCreateContextId(presetID, limits, visBits, share);
577}
578
579void crStateDestroyContext( CRContext *ctx )
580{
581 CRContext *current = GetCurrentContext();
582
583 if (current == ctx) {
584 /* destroying the current context - have to be careful here */
585 CRASSERT(defaultContext);
586 /* Check to see if the differencer exists first,
587 we may not have one, aka the packspu */
588 if (diff_api.AlphaFunc)
589 crStateSwitchContext(current, defaultContext);
590#ifdef CHROMIUM_THREADSAFE
591 SetCurrentContext(defaultContext);
592#else
593 __currentContext = defaultContext;
594#endif
595 /* ensure matrix state is also current */
596 crStateMatrixMode(defaultContext->transform.matrixMode);
597 }
598
599#ifdef CHROMIUM_THREADSAFE
600 VBoxTlsRefMarkDestroy(ctx);
601 VBoxTlsRefRelease(ctx);
602#else
603 crStateFreeContext(ctx);
604#endif
605}
606
607GLboolean crStateEnableDiffOnMakeCurrent(GLboolean fEnable)
608{
609 GLboolean bOld = g_bVBoxEnableDiffOnMakeCurrent;
610 g_bVBoxEnableDiffOnMakeCurrent = fEnable;
611 return bOld;
612}
613
614void crStateMakeCurrent( CRContext *ctx )
615{
616 CRContext *current = GetCurrentContext();
617
618 if (ctx == NULL)
619 ctx = defaultContext;
620
621 if (current == ctx)
622 return; /* no-op */
623
624 CRASSERT(ctx);
625
626 if (g_bVBoxEnableDiffOnMakeCurrent && current) {
627 /* Check to see if the differencer exists first,
628 we may not have one, aka the packspu */
629 if (diff_api.AlphaFunc)
630 crStateSwitchContext( current, ctx );
631 }
632
633#ifdef CHROMIUM_THREADSAFE
634 SetCurrentContext(ctx);
635#else
636 __currentContext = ctx;
637#endif
638
639 /* ensure matrix state is also current */
640 crStateMatrixMode(ctx->transform.matrixMode);
641}
642
643
644/*
645 * As above, but don't call crStateSwitchContext().
646 */
647void crStateSetCurrent( CRContext *ctx )
648{
649 CRContext *current = GetCurrentContext();
650
651 if (ctx == NULL)
652 ctx = defaultContext;
653
654 if (current == ctx)
655 return; /* no-op */
656
657 CRASSERT(ctx);
658
659#ifdef CHROMIUM_THREADSAFE
660 SetCurrentContext(ctx);
661#else
662 __currentContext = ctx;
663#endif
664
665 /* ensure matrix state is also current */
666 crStateMatrixMode(ctx->transform.matrixMode);
667}
668
669
670CRContext *crStateGetCurrent(void)
671{
672 return GetCurrentContext();
673}
674
675
676void crStateUpdateColorBits(void)
677{
678 /* This is a hack to force updating the 'current' attribs */
679 CRStateBits *sb = GetCurrentBits();
680 FILLDIRTY(sb->current.dirty);
681 FILLDIRTY(sb->current.vertexAttrib[VERT_ATTRIB_COLOR0]);
682}
683
684
685void STATE_APIENTRY
686crStateChromiumParameteriCR( GLenum target, GLint value )
687{
688 /* This no-op function helps smooth code-gen */
689}
690
691void STATE_APIENTRY
692crStateChromiumParameterfCR( GLenum target, GLfloat value )
693{
694 /* This no-op function helps smooth code-gen */
695}
696
697void STATE_APIENTRY
698crStateChromiumParametervCR( GLenum target, GLenum type, GLsizei count, const GLvoid *values )
699{
700 /* This no-op function helps smooth code-gen */
701}
702
703void STATE_APIENTRY
704crStateGetChromiumParametervCR( GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values )
705{
706 /* This no-op function helps smooth code-gen */
707}
708
709void STATE_APIENTRY
710crStateReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
711 GLenum format, GLenum type, GLvoid *pixels )
712{
713 /* This no-op function helps smooth code-gen */
714}
715
716void crStateVBoxDetachThread()
717{
718 /* release the context ref so that it can be freed */
719 SetCurrentContext(NULL);
720}
721
722
723void crStateVBoxAttachThread()
724{
725}
726
727GLint crStateVBoxCreateContext( GLint con, const char * dpyName, GLint visual, GLint shareCtx )
728{
729 return 0;
730}
731
732GLint crStateVBoxWindowCreate( GLint con, const char *dpyName, GLint visBits )
733{
734 return 0;
735}
736
737void crStateVBoxWindowDestroy( GLint con, GLint window )
738{
739}
740
741GLint crStateVBoxConCreate(struct VBOXUHGSMI *pHgsmi)
742{
743 return 0;
744}
745
746void crStateVBoxConDestroy(GLint con)
747{
748}
749
750void crStateVBoxConFlush(GLint con)
751{
752}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette