Changeset 44997 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Mar 11, 2013 4:37:50 PM (12 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/render
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r44922 r44997 769 769 } 770 770 771 int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter 771 int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter, int32_t i32MakeCurrentUserData) 772 772 { 773 773 int rc; … … 785 785 } 786 786 787 CrBltSetMakeCurrentUserData(pBlitter, i32MakeCurrentUserData); 788 787 789 rc = CrBltEnter(pBlitter, pCtxInfo, pWindowInfo); 788 790 if (!RT_SUCCESS(rc)) … … 794 796 } 795 797 796 PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window )798 PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData ) 797 799 { 798 800 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGet(window); 799 801 if (pBlitter) 800 802 { 801 int rc = renderspuVBoxPresentBlitterEnter(pBlitter );803 int rc = renderspuVBoxPresentBlitterEnter(pBlitter, i32MakeCurrentUserData); 802 804 if (RT_SUCCESS(rc)) 803 805 { … … 808 810 } 809 811 810 PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window )812 PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window, int32_t i32MakeCurrentUserData ) 811 813 { 812 814 if (!window->pBlitter) … … 823 825 if (!CrBltIsEverEntered(pBlitter)) 824 826 { 825 int rc = renderspuVBoxPresentBlitterEnter(pBlitter );827 int rc = renderspuVBoxPresentBlitterEnter(pBlitter, i32MakeCurrentUserData); 826 828 if (RT_SUCCESS(rc)) 827 829 { … … 849 851 } 850 852 851 void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry )852 { 853 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window );853 void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData ) 854 { 855 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData); 854 856 if (!pBlitter) 855 857 return; -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r44922 r44997 114 114 HWND hWnd; 115 115 HDC device_context; 116 HDC redraw_device_context; 116 117 HRGN hRgn; 117 118 #elif defined(DARWIN) … … 400 401 extern int renderspuVBoxCompositorTryAcquire(WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR **ppCompositor); 401 402 extern void renderspuVBoxCompositorRelease( WindowInfo *window); 402 extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry );403 extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData ); 403 404 extern PCR_BLITTER renderspuVBoxPresentBlitterGet( WindowInfo *window ); 404 405 void renderspuVBoxPresentBlitterCleanup( WindowInfo *window ); 405 extern int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter );406 extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window );407 extern PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window );406 extern int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter, int32_t i32MakeCurrentUserData ); 407 extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData ); 408 extern PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window, int32_t i32MakeCurrentUserData ); 408 409 extern void renderspuWindowTerm( WindowInfo *window ); 409 410 extern GLboolean renderspuWindowInit( WindowInfo *window, VisualInfo *visual, GLboolean showIt, GLint id ); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c
r44740 r44997 609 609 void renderspu_SystemVBoxPresentComposition( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry ) 610 610 { 611 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry );611 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0); 612 612 } 613 613 … … 621 621 CRASSERT(render_spu.ws.aglSetCurrentContext); 622 622 //crDebug( "renderspu_SystemMakeCurrent( %x, %i, %x )", window, nativeWindow, context ); 623 624 nativeWindow = 0; 623 625 624 626 if(window && context) -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa.c
r44784 r44997 162 162 /* printf ("visual mismatch .....................\n");*/ 163 163 164 nativeWindow = 0; 165 164 166 if (pWinInfo && pCtxInfo) 165 167 cocoaViewMakeCurrentContext(pWinInfo->window, pCtxInfo->context); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c
r44860 r44997 584 584 if (pCompositor) 585 585 { 586 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL );586 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 0); 587 587 renderspuVBoxCompositorRelease(pWindow); 588 588 } … … 1508 1508 } 1509 1509 #endif 1510 1511 nativeWindow = 0; 1510 1512 1511 1513 if (window && context) { … … 1967 1969 { 1968 1970 Assert(pCurCompositor == pCompositor); 1969 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry );1971 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0); 1970 1972 renderspuVBoxCompositorRelease(window); 1971 1973 } … … 1976 1978 XEvent event; 1977 1979 render_spu.self.Flush(); 1978 renderspuVBoxPresentBlitterEnsureCreated(window );1980 renderspuVBoxPresentBlitterEnsureCreated(window, 0); 1979 1981 1980 1982 crMemset(&event, 0, sizeof (event)); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
r44950 r44997 436 436 if (pCompositor) 437 437 { 438 HDC hDC , hOldDC = pWindow->device_context;438 HDC hDC; 439 439 PAINTSTRUCT Paint; 440 440 … … 444 444 { 445 445 BOOL bRc; 446 pWindow-> device_context = hDC;447 448 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL );446 pWindow->redraw_device_context = hDC; 447 448 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 1); 449 449 renderspuVBoxCompositorRelease(pWindow); 450 450 … … 456 456 } 457 457 458 pWindow-> device_context = hOldDC;458 pWindow->redraw_device_context = NULL; 459 459 } 460 460 else … … 1258 1258 { 1259 1259 Assert(pCurCompositor == pCompositor); 1260 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry );1260 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0); 1261 1261 renderspuVBoxCompositorRelease(window); 1262 1262 } … … 1265 1265 { 1266 1266 render_spu.self.Flush(); 1267 renderspuVBoxPresentBlitterEnsureCreated(window );1267 renderspuVBoxPresentBlitterEnsureCreated(window, 0); 1268 1268 RedrawWindow(window->hWnd, NULL, NULL, RDW_INTERNALPAINT); 1269 1269 } … … 1372 1372 } 1373 1373 1374 if ( render_spu.render_to_app_window && nativeWindow)1374 if (0/*render_spu.render_to_app_window && nativeWindow*/) 1375 1375 { 1376 1376 /* The render_to_app_window option … … 1413 1413 { 1414 1414 if (!context->hRC) { 1415 CRASSERT(!nativeWindow); 1415 1416 if (context->shared) 1416 1417 { … … 1464 1465 1465 1466 /*crDebug("MakeCurrent 0x%x, 0x%x", window->device_context, context->hRC);*/ 1466 if (!render_spu.ws.wglMakeCurrent( window->device_context, context->hRC))1467 if (!render_spu.ws.wglMakeCurrent(!nativeWindow ? window->device_context : window->redraw_device_context, context->hRC)) 1467 1468 { 1468 1469 DWORD err = GetLastError();
Note:
See TracChangeset
for help on using the changeset viewer.