VirtualBox

Changeset 53749 in vbox


Ignore:
Timestamp:
Jan 6, 2015 3:27:34 AM (10 years ago)
Author:
vboxsync
Message:

Use a context configured with the legacy OpenGL profile for getting information not available when using the OpenGL32Core profile.

Location:
trunk/src/VBox
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r53732 r53749  
    25772577                        SVGA3dCmdDefineContext *pCmd = (SVGA3dCmdDefineContext *)(pHdr + 1);
    25782578
    2579                         rc = vmsvga3dContextDefine(pThis, pCmd->cid);
     2579                        rc = vmsvga3dContextDefine(pThis, pCmd->cid, false /*fLegacy*/);
    25802580                        break;
    25812581                    }
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h

    r53599 r53749  
    3535#endif
    3636
    37 VMSVGA3D_DECL(void) vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pSharedCtx);
     37VMSVGA3D_DECL(void) vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pSharedCtx, bool fLegacy);
    3838VMSVGA3D_DECL(void) vmsvga3dCocoaDestroyContext(NativeNSOpenGLContextRef pCtx);
    3939VMSVGA3D_DECL(void) vmsvga3dCocoaCreateView(NativeNSViewRef *ppView, NativeNSViewRef pParentView);
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m

    r53599 r53749  
    623623
    624624
    625 void vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pShareCtx)
     625void vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pShareCtx, bool fLegacy)
    626626{
    627627    DEBUG_FUNC_ENTER();
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r53745 r53749  
    406406    NativeNSOpenGLContextRef cocoaContext;
    407407    NativeNSViewRef          cocoaView;
     408    bool                    fLegacy;
    408409#else
    409410    /** XGL rendering context handle */
     
    504505};
    505506
    506 typedef struct
     507/**
     508 * VMSVGA3d state data.
     509 *
     510 * Allocated on the heap and pointed to by VMSVGAState::p3dState.
     511 */
     512typedef struct VMSVGA3DSTATE
    507513{
    508514#ifdef RT_OS_WINDOWS
     
    598604    uint32_t                idTestContext;
    599605#endif
    600 } VMSVGA3DSTATE, *PVMSVGA3DSTATE;
     606#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
     607    /** Legacy OpenGL profile GL_EXTENSIONS result (RTStrDup).
     608     * This is used to detect shader model version since some implementations
     609     * (darwin) hides extensions that have made it into core and probably a
     610     * bunch of others when using a OpenGL core profile instead of a legacy one */
     611    R3PTRTYPE(char *)       pszLegacyExtensions;
     612#endif
     613} VMSVGA3DSTATE;
     614/** Pointer to the VMSVGA3d state. */
     615typedef VMSVGA3DSTATE *PVMSVGA3DSTATE;
    601616
    602617/**
     
    904919    AssertReturn(pThis->svga.p3dState, VERR_NO_MEMORY);
    905920    PVMSVGA3DCONTEXT pContext;
     921#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
     922    PVMSVGA3DCONTEXT pLegacyContext;
     923#endif
    906924    int              rc;
    907925
     
    909927        return VINF_SUCCESS;    /* already initialized (load state) */
    910928
    911     /* OpenGL function calls aren't possible without a valid current context, so create a fake one here. */
    912     rc = vmsvga3dContextDefine(pThis, 1);
     929    /*
     930     * Initialize the capabilities with sensible defaults.
     931     */
     932    pState->caps.maxActiveLights               = 1;
     933    pState->caps.maxTextureBufferSize          = 65536;
     934    pState->caps.maxTextures                   = 1;
     935    pState->caps.maxClipDistances              = 4;
     936    pState->caps.maxColorAttachments           = 1;
     937    pState->caps.maxRectangleTextureSize       = 2048;
     938    pState->caps.maxTextureAnisotropy          = 2;
     939    pState->caps.maxVertexShaderInstructions   = 1024;
     940    pState->caps.maxFragmentShaderInstructions = 1024;
     941    pState->caps.vertexShaderVersion           = SVGA3DVSVERSION_NONE;
     942    pState->caps.fragmentShaderVersion         = SVGA3DPSVERSION_NONE;
     943
     944    /*
     945     * OpenGL function calls aren't possible without a valid current context, so create a fake one here.
     946     */
     947    rc = vmsvga3dContextDefine(pThis, 1, false /*fLegacy*/);
    913948    AssertRCReturn(rc, rc);
    914949
     
    921956
    922957    pState->fGLVersion = atof((const char *)glGetString(GL_VERSION));
     958
     959
     960#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
     961    /*
     962     * Get the legacy extension list so we can better figure out the shader model.
     963     * We add space before and after the list, so we can use strstr for locating extensions.
     964     */
     965    rc = vmsvga3dContextDefine(pThis, 2, true /*fLegacy*/);
     966    AssertLogRelRCReturn(rc, rc);
     967    pContext = &pState->paContext[1]; /* Array may have been reallocated. */
     968
     969    pLegacyContext = &pState->paContext[2];
     970    VMSVGA3D_SET_CURRENT_CONTEXT(pState, pLegacyContext);
     971
     972    pState->pszLegacyExtensions = NULL;
     973    rc = RTStrAAppendExN(&pState->pszLegacyExtensions, 3,
     974                         " ", (size_t)1, (const char *)glGetString(GL_EXTENSIONS), RTSTR_MAX, " ", (size_t)1);
     975    AssertLogRelRCReturn(rc, rc);
     976
     977    LogRel(("VMSVGA3d: Legacy OpenGL version: %s\nOpenGL Vendor: %s\nOpenGL Renderer: %s\n", glGetString(GL_VERSION), glGetString(GL_VENDOR), glGetString(GL_RENDERER)));
     978    LogRel(("VMSVGA3d: Legacy OpenGL shader language version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)));
     979    LogRel(("VMSVGA3d: Legacy OpenGL extenions: %s\n", glGetString(GL_EXTENSIONS)));
     980
     981    VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext);
     982#else
     983    pState->pszLegacyExtensions = "";
     984#endif
     985
    923986
    924987    if (vmsvga3dCheckGLExtension(pState->fGLVersion, 3.0, "GL_ARB_framebuffer_object"))
     
    10111074#endif
    10121075
    1013     /* First set sensible defaults. */
    1014     pState->caps.maxActiveLights               = 1;
    1015     pState->caps.maxTextureBufferSize          = 65536;
    1016     pState->caps.maxTextures                   = 1;
    1017     pState->caps.maxClipDistances              = 4;
    1018     pState->caps.maxColorAttachments           = 1;
    1019     pState->caps.maxRectangleTextureSize       = 2048;
    1020     pState->caps.maxTextureAnisotropy          = 2;
    1021     pState->caps.maxVertexShaderInstructions   = 1024;
    1022     pState->caps.maxFragmentShaderInstructions = 1024;
    1023     pState->caps.vertexShaderVersion           = SVGA3DVSVERSION_NONE;
    1024     pState->caps.fragmentShaderVersion         = SVGA3DPSVERSION_NONE;
    1025 
    10261076    /* Query capabilities */
    10271077#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
    10281078    glGetIntegerv(GL_MAX_LIGHTS, &pState->caps.maxActiveLights);
    10291079    if (glGetError() != GL_NO_ERROR)
    1030         pState->caps.maxActiveLights = 1;
     1080    {
     1081        VMSVGA3D_SET_CURRENT_CONTEXT(pState, pLegacyContext);
     1082        VMSVGA3D_INIT_CHECKED_GL_GET_INTEGER_VALUE(GL_MAX_LIGHTS, &pState->caps.maxActiveLights);
     1083        if (glGetError() != GL_NO_ERROR)
     1084            pState->caps.maxActiveLights = 1;
     1085        VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext);
     1086    }
    10311087#else
    10321088    VMSVGA3D_INIT_CHECKED_GL_GET_INTEGER_VALUE(GL_MAX_LIGHTS, &pState->caps.maxActiveLights);
     
    10481104    if (glGetError() != GL_NO_ERROR)
    10491105    {
    1050         pState->caps.flPointSize[0] = 1;
    1051         pState->caps.flPointSize[1] = 1;
     1106        VMSVGA3D_SET_CURRENT_CONTEXT(pState, pLegacyContext);
     1107        VMSVGA3D_INIT_CHECKED(glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, pState->caps.flPointSize));
     1108        if (glGetError() != GL_NO_ERROR)
     1109        {
     1110            pState->caps.flPointSize[0] = 1;
     1111            pState->caps.flPointSize[1] = 1;
     1112        }
     1113        VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext);
    10521114    }
    10531115#else
     
    10571119    if (pState->ext.glGetProgramivARB)
    10581120    {
    1059 #ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
    1060         pState->ext.glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB,
    1061                                       &pState->caps.maxFragmentShaderTemps);
    1062         if (glGetError() != GL_NO_ERROR)
    1063             pState->caps.maxFragmentShaderTemps = D3DVS20_MAX_NUMTEMPS;
    1064         pState->ext.glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB,
    1065                                       &pState->caps.maxFragmentShaderInstructions);
    1066         if (glGetError() != GL_NO_ERROR)
    1067             pState->caps.maxFragmentShaderInstructions = 0;
    1068 
    1069         pState->ext.glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB,
    1070                                       &pState->caps.maxVertexShaderTemps);
    1071         if (glGetError() != GL_NO_ERROR)
    1072             pState->caps.maxVertexShaderTemps = D3DVS20_MAX_NUMTEMPS;
    1073         pState->ext.glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB,
    1074                                       &pState->caps.maxVertexShaderInstructions);
    1075         if (glGetError() != GL_NO_ERROR)
    1076             pState->caps.maxVertexShaderInstructions = 0;
    1077 
    1078 #else
     1121#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE /* None of these queries works with the OpenGL 3.2 Core context on darwin. */
     1122        VMSVGA3D_SET_CURRENT_CONTEXT(pState, pLegacyContext);
     1123#endif
    10791124        VMSVGA3D_INIT_CHECKED(pState->ext.glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB,
    10801125                                                            &pState->caps.maxFragmentShaderTemps));
     
    10851130        VMSVGA3D_INIT_CHECKED(pState->ext.glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB,
    10861131                                                            &pState->caps.maxVertexShaderInstructions));
     1132#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
     1133        VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext);
    10871134#endif
    10881135    }
     
    10991146     */
    11001147    /** @todo: distinguish between vertex and pixel shaders??? */
    1101     if (vmsvga3dCheckGLExtension(pState->fGLVersion, 0.0, "GL_NV_gpu_program4"))
     1148    if (   vmsvga3dCheckGLExtension(pState->fGLVersion, 0.0, "GL_NV_gpu_program4")
     1149        || strstr(pState->pszLegacyExtensions, " GL_NV_gpu_program4 "))
    11021150    {
    11031151        pState->caps.vertexShaderVersion   = SVGA3DVSVERSION_40;
     
    11061154    else
    11071155    if (    vmsvga3dCheckGLExtension(pState->fGLVersion, 0.0, "GL_NV_vertex_program3")
     1156        || strstr(pState->pszLegacyExtensions, " GL_NV_vertex_program3 ")
    11081157#if 0 /** @todo this is contrary to the ATI <= SM2.0. */
    11091158        ||  vmsvga3dCheckGLExtension(pState->fGLVersion, 0.0, "GL_ARB_shader_texture_lod")  /* Wine claims this suggests SM 3.0 support */
     1159        || strstr(pState->pszLegacyExtensions, " GL_ARB_shader_texture_lod ")
    11101160#endif
    11111161        )
     
    11151165    }
    11161166    else
    1117     if (vmsvga3dCheckGLExtension(pState->fGLVersion, 0.0, "GL_ARB_fragment_program"))
     1167    if (   vmsvga3dCheckGLExtension(pState->fGLVersion, 0.0, "GL_ARB_fragment_program")
     1168        || strstr(pState->pszLegacyExtensions, " GL_ARB_fragment_program "))
    11181169    {
    11191170        pState->caps.vertexShaderVersion   = SVGA3DVSVERSION_20;
     
    11991250
    12001251    LogRel(("VMSVGA3d: Capabilities:\n"));
    1201     LogRel(("VMSVGA3d:   maxActiveLights=%d  maxTextureBufferSize=%d  maxTextures=%d\n",
    1202             pState->caps.maxActiveLights, pState->caps.maxTextureBufferSize, pState->caps.maxTextures));
    1203     LogRel(("VMSVGA3d:   maxClipDistances=%d  maxColorAttachments=%d  maxClipDistances=%d\n",
     1252    LogRel(("VMSVGA3d:   maxActiveLights=%-2d       maxTextures=%-2d           maxTextureBufferSize=%d\n",
     1253            pState->caps.maxActiveLights, pState->caps.maxTextures, pState->caps.maxTextureBufferSize));
     1254    LogRel(("VMSVGA3d:   maxClipDistances=%-2d      maxColorAttachments=%-2d   maxClipDistances=%d\n",
    12041255            pState->caps.maxClipDistances, pState->caps.maxColorAttachments, pState->caps.maxClipDistances));
    1205     LogRel(("VMSVGA3d:   maxColorAttachments=%d  maxRectangleTextureSize=%d  maxTextureAnisotropy=%d\n",
    1206             pState->caps.maxColorAttachments, pState->caps.maxRectangleTextureSize, pState->caps.maxTextureAnisotropy));
    1207     LogRel(("VMSVGA3d:   maxVertexShaderInstructions=%d  maxFragmentShaderInstructions=%d  maxVertexShaderTemps=%d\n",
    1208             pState->caps.maxVertexShaderInstructions, pState->caps.maxFragmentShaderInstructions, pState->caps.maxVertexShaderTemps));
    1209     LogRel(("VMSVGA3d:   maxFragmentShaderTemps=%d  flPointSize={%d.%02u, %d.%02u}\n",
     1256    LogRel(("VMSVGA3d:   maxColorAttachments=%-2d   maxTextureAnisotropy=%-2d  maxRectangleTextureSize=%d\n",
     1257            pState->caps.maxColorAttachments, pState->caps.maxTextureAnisotropy, pState->caps.maxRectangleTextureSize));
     1258    LogRel(("VMSVGA3d:   maxVertexShaderTemps=%-2d  maxVertexShaderInstructions=%d maxFragmentShaderInstructions=%d\n",
     1259            pState->caps.maxVertexShaderTemps, pState->caps.maxVertexShaderInstructions, pState->caps.maxFragmentShaderInstructions));
     1260    LogRel(("VMSVGA3d:   maxFragmentShaderTemps=%d flPointSize={%d.%02u, %d.%02u}\n",
    12101261            pState->caps.maxFragmentShaderTemps,
    12111262            (int)pState->caps.flPointSize[0], (int)(pState->caps.flPointSize[0] * 100) % 100,
    12121263            (int)pState->caps.flPointSize[1], (int)(pState->caps.flPointSize[1] * 100) % 100));
    1213     LogRel(("VMSVGA3d: fragmentShaderVersion=%d  vertexShaderVersion=%d  fS3TCSupported=%d\n",
     1264    LogRel(("VMSVGA3d:   fragmentShaderVersion=%-2d vertexShaderVersion=%-2d   fS3TCSupported=%d\n",
    12141265            pState->caps.fragmentShaderVersion, pState->caps.vertexShaderVersion, pState->caps.fS3TCSupported));
    12151266
     
    12221273    rc = vmsvga3dContextDestroy(pThis, 1);
    12231274    AssertRC(rc);
     1275#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
     1276    rc = vmsvga3dContextDestroy(pThis, 2);
     1277    AssertRC(rc);
     1278#endif
    12241279
    12251280#if !defined(RT_OS_DARWIN) || defined(VBOX_VMSVGA3D_USE_OPENGL_CORE)
     
    12861341{
    12871342    PVMSVGA3DSTATE pState = (PVMSVGA3DSTATE)pThis->svga.p3dState;
    1288     AssertReturn(pThis->svga.p3dState, VERR_NO_MEMORY);
     1343    AssertReturn(pState, VERR_WRONG_ORDER);
    12891344    int            rc;
    12901345
     
    13121367    XCloseDisplay(pState->display);
    13131368#endif
     1369
     1370#ifdef VBOX_VMSVGA3D_USE_OPENGL_CORE
     1371    RTStrFree(pState->pszLegacyExtensions);
     1372#endif
     1373    pState->pszLegacyExtensions = NULL;
    13141374
    13151375    return VINF_SUCCESS;
     
    31883248 * @param   pThis           VGA device instance data.
    31893249 * @param   cid             Context id
     3250 * @param   fLegacy         Whether to create a legacy context instead of
     3251 *                          whatever is default.  Only used at init time.
    31903252 */
    3191 int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid)
     3253int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid, bool fLegacy)
    31923254{
    31933255    int                     rc;
     
    31973259    AssertReturn(pState, VERR_NO_MEMORY);
    31983260    AssertReturn(cid < SVGA3D_MAX_CONTEXT_IDS, VERR_INVALID_PARAMETER);
     3261#if !defined(VBOX_VMSVGA3D_USE_OPENGL_CORE) || !(defined(RT_OS_DARWIN))
     3262    AssertReturn(!fLegacy, VERR_INTERNAL_ERROR_3);
     3263#endif
    31993264
    32003265    Log(("vmsvga3dContextDefine id %x\n", cid));
     
    32033268    {
    32043269        pState->idTestContext = 207;
    3205         rc = vmsvga3dContextDefine(pThis, pState->idTestContext);
     3270        rc = vmsvga3dContextDefine(pThis, pState->idTestContext, false /*fLegacy*/);
    32063271        AssertRCReturn(rc, rc);
    32073272    }
     
    33233388
    33243389#elif defined(RT_OS_DARWIN)
     3390    pContext->fLegacy = fLegacy;
     3391
    33253392    /* Find the first active context to share the display list with (necessary for sharing e.g. textures between contexts). */
    33263393    NativeNSOpenGLContextRef shareContext = NULL;
     
    33283395    {
    33293396        if (    pState->paContext[i].id != SVGA3D_INVALID_ID
    3330             &&  i != pContext->id)
     3397            &&  i != pContext->id
     3398            &&  pState->paContext[i].fLegacy == fLegacy)
    33313399        {
    33323400            Log(("Sharing display lists between cid=%d and cid=%d\n", pContext->id, i));
     
    33353403        }
    33363404    }
    3337     vmsvga3dCocoaCreateContext(&pContext->cocoaContext, shareContext);
     3405    vmsvga3dCocoaCreateContext(&pContext->cocoaContext, shareContext, fLegacy);
    33383406    NativeNSViewRef pHostView = (NativeNSViewRef)pThis->svga.u64HostWindowId;
    33393407    vmsvga3dCocoaCreateView(&pContext->cocoaView, pHostView);
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.h

    r53624 r53749  
    4949            uint32_t cPixelShaderConst, cVertexShaderConst, cPixelShaders, cVertexShaders;
    5050
    51             rc = vmsvga3dContextDefine(pThis, cid);
     51            rc = vmsvga3dContextDefine(pThis, cid, false /*fLegacy*/);
    5252            AssertRCReturn(rc, rc);
    5353
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp

    r53624 r53749  
    29022902 * @param   pThis           VGA device instance data.
    29032903 * @param   cid             Context id
     2904 * @param   fLegacy         OpenGL(+darwin) specific argument, ignored.
    29042905 */
    2905 int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid)
     2906int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid, bool fLegacy)
    29062907{
    29072908    int                     rc;
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h

    r53206 r53749  
    6161int vmsvga3dSurfaceBlitToScreen(PVGASTATE pThis, uint32_t dest, SVGASignedRect destRect, SVGA3dSurfaceImageId src, SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *pRect);
    6262
    63 int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid);
     63int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid, bool fLegacy);
    6464int vmsvga3dContextDestroy(PVGASTATE pThis, uint32_t cid);
    6565
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m

    r53741 r53749  
    223223
    224224/*
    225  * VMSVGA3D compatability glue.
     225 * VMSVGA3D compatibility glue.
    226226 */
    227227
     
    238238# define CR_OVERLAY_BIT         RT_BIT_32(8)
    239239# define CR_PBUFFER_BIT         RT_BIT_32(9)
    240 # define CR_ALL_BITS            UINT32_C(0x000003ff)
     240# define VMSVGA3D_LEGACY_PROFILE_BIT RT_BIT_32(31)
     241# define CR_ALL_BITS            UINT32_C(0x800003ff)
    241242
    242243typedef struct WindowInfo
     
    11321133
    11331134    self = [super initWithFormat:format shareContext:share];
     1135    Assert(self != nil);
    11341136    if (self)
    11351137        m_pPixelFormat = format;
     
    25752577    int i = 3;
    25762578
     2579#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    }
     2588#endif
     2589
    25772590    if (fVisParams & CR_ALPHA_BIT)
    25782591    {
     
    26382651    {
    26392652        *ppCtx = [[OverlayOpenGLContext alloc] initWithFormat:pFmt shareContext:pSharedCtx];
     2653        Assert(*ppCtx);
    26402654
    26412655        /* Enable multi threaded OpenGL engine */
     
    26482662    }
    26492663    else
     2664    {
     2665        AssertFailed();
    26502666        *ppCtx = NULL;
     2667    }
    26512668
    26522669    [pPool release];
     
    29672984 */
    29682985
    2969 VMSVGA3D_DECL(void) vmsvga3dCocoaCreateContext(NativeNSOpenGLContextRef *ppCtx, NativeNSOpenGLContextRef pSharedCtx)
    2970 {
    2971     cocoaGLCtxCreate(ppCtx, CR_ALPHA_BIT | CR_DEPTH_BIT | CR_DOUBLE_BIT, pSharedCtx);
     2986VMSVGA3D_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),
     2989                     pSharedCtx);
    29722990}
    29732991
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