Changeset 26545 in vbox
- Timestamp:
- Feb 15, 2010 2:26:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/context.c
r16718 r26545 32 32 #include "stub.h" 33 33 34 typedef struct { 35 WindowInfo *window; 36 GLboolean windowInUse; 37 } CtxCheckCurrentDrawableParams_t; 34 38 35 39 /** … … 786 790 } 787 791 792 static void stubCtxCheckCurrentDrawableCB(unsigned long key, void *data1, void *data2) 793 { 794 ContextInfo *pCtx = (ContextInfo *) data1; 795 CtxCheckCurrentDrawableParams_t *pParams = (CtxCheckCurrentDrawableParams_t *) data2; 796 797 if (pCtx->currentDrawable == pParams->window) 798 { 799 pParams->windowInUse = GL_TRUE; 800 } 801 } 788 802 789 803 GLboolean … … 835 849 if (window->spuWindow == -1) 836 850 { 851 /*crDebug("(1)stubMakeCurrent ctx=%p(%i) window=%p(%i)", context, context->spuContext, window, window->spuWindow);*/ 837 852 window->spuWindow = stub.spu->dispatch_table.WindowCreate( window->dpyName, context->visBits ); 838 853 CRASSERT(!context->pOwnWindow); … … 891 906 if (window->spuWindow == -1) 892 907 { 908 /*crDebug("(2)stubMakeCurrent ctx=%p(%i) window=%p(%i)", context, context->spuContext, window, window->spuWindow);*/ 893 909 window->spuWindow = stub.spu->dispatch_table.WindowCreate( window->dpyName, context->visBits ); 894 CRASSERT(!context->pOwnWindow); 910 if (context->pOwnWindow) 911 { 912 WindowInfo *pOwnWindow = context->pOwnWindow; 913 CtxCheckCurrentDrawableParams_t params; 914 915 context->pOwnWindow = NULL; 916 context->currentDrawable=NULL; 917 918 params.window = pOwnWindow; 919 params.windowInUse = GL_FALSE; 920 921 crHashtableWalk(stub.contextTable, stubCtxCheckCurrentDrawableCB, ¶ms); 922 923 if (!params.windowInUse) 924 { 925 #ifdef WINDOWS 926 crWindowDestroy((GLint)pOwnWindow->hWnd); 927 #else 928 crWindowDestroy((GLint)pOwnWindow->drawable); 929 #endif 930 } 931 } 895 932 context->pOwnWindow = window; 896 933 }
Note:
See TracChangeset
for help on using the changeset viewer.