VirtualBox

Ignore:
Timestamp:
Feb 12, 2015 12:20:56 AM (10 years ago)
Author:
vboxsync
Message:

DevVGA-SVGA3d-cocoa.m/h: Build fix and dual profile support. (doesn't work better than the original)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m

    r53946 r54167  
     1/* $Id$ */
    12/** @file
    23 * VirtualBox OpenGL Cocoa Window System Helper Implementation.
     
    2223
    2324#include <iprt/thread.h>
     25#include <iprt/assert.h>
    2426
    2527/* Debug macros */
     
    629631    NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
    630632
    631 #if 1
    632     // @todo galitsyn: NSOpenGLPFAWindow was deprecated starting from OSX 10.9.
    633633    // Consider to remove it and check if it's harmless.
    634634    NSOpenGLPixelFormatAttribute attribs[] =
    635635    {
    636         NSOpenGLPFAWindow,
     636        NSOpenGLPFAOpenGLProfile, (NSOpenGLPixelFormatAttribute)0,
     637        //NSOpenGLPFAWindow, - obsolete/deprecated, try work without it...
     638        NSOpenGLPFAAccelerated,
    637639        NSOpenGLPFADoubleBuffer,
    638         NSOpenGLPFAAccelerated,
    639640        NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)24,
    640641        NSOpenGLPFAAlphaSize, (NSOpenGLPixelFormatAttribute)8,
     
    642643        0
    643644    };
    644 #else
    645     NSOpenGLPixelFormatAttribute attribs[] =
    646     {
    647         NSOpenGLPFADoubleBuffer,
    648         NSOpenGLPFAAccelerated,
    649         NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)24,
    650         NSOpenGLPFADepthSize, 24,
    651         NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
    652         0
    653     };
    654 #endif
     645    attribs[1] = fOtherProfile ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy;
    655646
    656647    /* Choose a pixel format */
    657648    pFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
    658 
    659649    if (pFmt)
    660650    {
    661651        *ppCtx = [[VMSVGA3DOpenGLContext alloc] initWithFormat:pFmt shareContext:pShareCtx];
    662652        DEBUG_MSG(("New context %p\n", (void *)*ppCtx));
     653    }
     654    else
     655    {
     656        AssertFailed();
     657        *ppCtx = NULL;
    663658    }
    664659
     
    765760    DEBUG_FUNC_LEAVE();
    766761}
     762
Note: See TracChangeset for help on using the changeset viewer.

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