Changeset 53755 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Jan 6, 2015 9:06:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
r53749 r53755 238 238 # define CR_OVERLAY_BIT RT_BIT_32(8) 239 239 # define CR_PBUFFER_BIT RT_BIT_32(9) 240 # define VMSVGA3D_ LEGACY_PROFILE_BIT RT_BIT_32(31)240 # define VMSVGA3D_NON_DEFAULT_PROFILE_BIT RT_BIT_32(31) 241 241 # define CR_ALL_BITS UINT32_C(0x800003ff) 242 242 … … 311 311 312 312 313 #endif 313 #endif /* IN_VMSVGA3D */ 314 314 315 315 … … 318 318 { 319 319 #ifdef IN_VMSVGA3D 320 return [NSOpenGLContext currentContext]; 320 321 #else 321 322 GET_CONTEXT(pCtxInfo); … … 325 326 return pCtxInfo->context; 326 327 } 327 #endif328 329 328 return nil; 329 #endif 330 330 } 331 331 332 332 static bool vboxCtxSyncCurrentInfo(void) 333 333 { 334 #ifdef IN_VMSVGA3D 335 return false; 336 #else 334 337 bool fAdjusted = false; 335 #ifdef IN_VMSVGA3D336 #else337 338 GET_CONTEXT(pCtxInfo); 338 339 NSOpenGLContext *pCtx = [NSOpenGLContext currentContext]; … … 354 355 fAdjusted = true; 355 356 } 356 #endif357 357 358 358 return fAdjusted; 359 #endif 359 360 } 360 361 … … 2026 2027 return; 2027 2028 } 2029 2030 #ifdef IN_VMSVGA3D 2031 if (!m_pSharedGLCtx) 2032 { 2033 Assert(!m_fDataVisible); 2034 Assert(!m_fCleanupNeeded); 2035 if (![self vboxSharedCtxCreate]) 2036 { 2037 COCOA_LOG_FLOW(("%s: returns - vboxSharedCtxCreate failed\n", __PRETTY_FUNCTION__)); 2038 return; 2039 } 2040 Assert(m_pSharedGLCtx); 2041 } 2042 #endif 2028 2043 2029 2044 const VBOXVR_SCR_COMPOSITOR *pCompositor; … … 2074 2089 { 2075 2090 DEBUG_MSG(("%s: NeedCleanup\n", __PRETTY_FUNCTION__)); 2091 #ifndef IN_VMSVGA3D /** @todo VMSVGA3 */ 2076 2092 Assert(m_fCleanupNeeded); 2093 #endif 2077 2094 CrVrScrCompositorInit(&TmpCompositor, NULL); 2078 2095 pCompositor = &TmpCompositor; … … 2565 2582 { 2566 2583 #ifdef IN_VMSVGA3D 2567 # ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE 2568 NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, 2569 # else 2570 NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, 2571 # endif 2584 NSOpenGLPFAOpenGLProfile, (NSOpenGLPixelFormatAttribute)0, 2572 2585 #endif 2573 2586 NSOpenGLPFAAccelerated, … … 2578 2591 2579 2592 #ifdef IN_VMSVGA3D 2580 if (fVisParams & VMSVGA3D_LEGACY_PROFILE_BIT) 2581 { 2582 # ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE 2583 attribs[1] = NSOpenGLProfileVersionLegacy; 2584 # else 2585 AssertFailed(); 2586 # endif 2587 } 2593 if (fVisParams & VMSVGA3D_NON_DEFAULT_PROFILE_BIT) 2594 attribs[1] = VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE >= 3.2 ? NSOpenGLProfileVersionLegacy : NSOpenGLProfileVersion3_2Core; 2595 else 2596 attribs[1] = VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE >= 3.2 ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy; 2588 2597 #endif 2589 2598 … … 2984 2993 */ 2985 2994 2986 VMSVGA3D_DECL(void) vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pSharedCtx, bool fLegacy) 2987 { 2988 cocoaGLCtxCreate(ppCtx, CR_ALPHA_BIT | CR_DEPTH_BIT | CR_DOUBLE_BIT | (fLegacy ? VMSVGA3D_LEGACY_PROFILE_BIT : 0), 2995 VMSVGA3D_DECL(void) vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pSharedCtx, 2996 bool fOtherProfile) 2997 { 2998 cocoaGLCtxCreate(ppCtx, CR_ALPHA_BIT | CR_DEPTH_BIT | CR_DOUBLE_BIT | (fOtherProfile ? VMSVGA3D_NON_DEFAULT_PROFILE_BIT : 0), 2989 2999 pSharedCtx); 2990 3000 }
Note:
See TracChangeset
for help on using the changeset viewer.