- Timestamp:
- Jun 10, 2015 11:32:01 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m
r56292 r56333 36 36 *******************************************************************************/ 37 37 /** @def USE_NSOPENGLVIEW 38 * Define this to experiment with using NSOpenGLView instead 39 * of NSView. There are transparency issues with the former, 38 * Define this to experiment with using NSOpenGLView instead 39 * of NSView. There are transparency issues with the former, 40 40 * so for the time being we're using the latter. */ 41 41 #if 0 … … 54 54 @public 55 55 /* in */ 56 NativeNSViewRef pParentView; 56 NativeNSViewRef pParentView; 57 57 uint32_t cx; 58 58 uint32_t cy; … … 70 70 * The overlay view. 71 71 */ 72 @interface VMSVGA3DOverlayView 72 @interface VMSVGA3DOverlayView 73 73 #ifdef USE_NSOPENGLVIEW 74 74 : NSOpenGLView … … 90 90 NSPoint m_Pos; 91 91 NSSize m_Size; 92 92 93 93 /** This is necessary for clipping on the root window */ 94 94 NSRect m_RootRect; … … 110 110 111 111 #endif 112 /* Overridden: */ 112 /* Overridden: */ 113 113 - (void)viewDidMoveToWindow; 114 114 - (void)viewDidMoveToSuperview; … … 167 167 { 168 168 /* 169 * If we have no shared GL context, we use the one that NSOpenGLView create. Otherwise, 170 * we replace it. (If we don't call openGLContext, it won't yet have been instantiated, 169 * If we have no shared GL context, we use the one that NSOpenGLView create. Otherwise, 170 * we replace it. (If we don't call openGLContext, it won't yet have been instantiated, 171 171 * so there is no unecessary contexts created here when pSharedCtx != NULL.) 172 172 */ … … 190 190 if (pCtx) 191 191 { 192 /* 192 /* 193 193 * Attach the view to the parent. 194 194 */ … … 240 240 m_Size = frame.size; 241 241 m_RootRect = NSMakeRect(0, 0, m_Size.width, m_Size.height); 242 242 243 243 #ifdef USE_NSOPENGLVIEW 244 244 self = [super initWithFrame:frame pixelFormat:pFmt]; … … 324 324 325 325 /* 326 * Not doing any complicate stuff here yet, hoping that we'll get correctly 326 * Not doing any complicate stuff here yet, hoping that we'll get correctly 327 327 * resized when the parent view changes... 328 328 */ … … 340 340 341 341 342 /** 343 * Changes to the OpenGL context associated with the view. 344 * @returns Previous OpenGL context. 345 */ 342 /** 343 * Changes to the OpenGL context associated with the view. 344 * @returns Previous OpenGL context. 345 */ 346 346 - (NSOpenGLContext *)makeCurrentGLContext 347 347 { … … 359 359 360 360 /** 361 * Restores the previous OpenGL context after 362 * makeCurrentGLContext. 363 * 361 * Restores the previous OpenGL context after 362 * makeCurrentGLContext. 363 * 364 364 * @param pSavedCtx The makeCurrentGLContext return value. 365 365 */ … … 415 415 #endif /* USE_NSOPENGLVIEW */ 416 416 417 /* 417 /* 418 418 * Overridden NSOpenGLView / NSView methods: 419 419 */ … … 435 435 -(void)resizeWithOldSuperviewSize:(NSSize)oldBoundsSize 436 436 { 437 LogFlow(("OvlView(%p) resizeWithOldSuperviewSize: %d,%d -> %d,%d\n", (void *)self, 437 LogFlow(("OvlView(%p) resizeWithOldSuperviewSize: %d,%d -> %d,%d\n", (void *)self, 438 438 (int)oldBoundsSize.width, (int)oldBoundsSize.height, (int)[self bounds].size.width, (int)[self bounds].size.height)); 439 439 [super resizeWithOldSuperviewSize:oldBoundsSize]; … … 474 474 NativeNSOpenGLContextRef pSharedCtx, bool fOtherProfile) 475 475 { 476 LogFlow(("vmsvga3dCocoaCreateViewAndContext: pParentView=%d size=%d,%d pSharedCtx=%p fOtherProfile=%RTbool\n", 476 LogFlow(("vmsvga3dCocoaCreateViewAndContext: pParentView=%d size=%d,%d pSharedCtx=%p fOtherProfile=%RTbool\n", 477 477 (void *)pParentView, cx, cy, (void *)pSharedCtx, fOtherProfile)); 478 478 NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; … … 571 571 } 572 572 else 573 573 [NSOpenGLContext clearCurrentContext]; 574 574 575 575 [pPool release]; … … 599 599 //[pView setNeedsDisplay:YES]; 600 600 vmsvga3dCocoaServiceRunLoop(); 601 601 602 602 [pPool release]; 603 603 LogFlow(("vmsvga3dCocoaSwapBuffers: returns\n")); -
trunk/src/VBox/Devices/Graphics/VBoxSVGA3D.def
r53736 r56333 17 17 18 18 LIBRARY VBoxSVGA3D 19 EXPORTS 19 EXPORTS 20 20 ShaderInitLib 21 21 ShaderDestroyLib -
trunk/src/VBox/Devices/Graphics/VBoxSVGA3DObjC.def
r55840 r56333 17 17 18 18 LIBRARY VBoxSVGA3DObjC 19 EXPORTS 19 EXPORTS 20 20 vmsvga3dCocoaServiceRunLoop 21 21 vmsvga3dCocoaCreateViewAndContext 22 vmsvga3dCocoaDestroyViewAndContext 23 vmsvga3dCocoaViewSetPosition 24 vmsvga3dCocoaViewSetSize 25 vmsvga3dCocoaViewMakeCurrentContext 26 vmsvga3dCocoaSwapBuffers 22 vmsvga3dCocoaDestroyViewAndContext 23 vmsvga3dCocoaViewSetPosition 24 vmsvga3dCocoaViewSetSize 25 vmsvga3dCocoaViewMakeCurrentContext 26 vmsvga3dCocoaSwapBuffers 27 27
Note:
See TracChangeset
for help on using the changeset viewer.