VirtualBox

Ticket #2940: vbox_opengl_workarounds.diff

File vbox_opengl_workarounds.diff, 2.1 KB (added by Robert Millan, 16 years ago)
  • dlls/wined3d/directx.c

    diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
    index 478c216..87b18dc 100644
    a b static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {  
    793804            else gl_info->pfn = NULL; \
    794805        }
    795806        GL_EXT_FUNCS_GEN;
    796 #undef USE_GL_FUNC
    797 
    798 #define USE_GL_FUNC(type, pfn, ext, replace) gl_info->pfn = (type) pwglGetProcAddress(#pfn);
    799807        WGL_EXT_FUNCS_GEN;
    800808#undef USE_GL_FUNC
    801809
    static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {  
    13991410    /* Make sure there's an active HDC else the WGL extensions will fail */
    14001411    hdc = pwglGetCurrentDC();
    14011412    if (hdc) {
    1402         WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc));
    1403         TRACE_(d3d_caps)("WGL_Extensions reported:\n");
    1404 
    1405         if (NULL == WGL_Extensions) {
    1406             ERR("   WGL_Extensions returns NULL\n");
     1413        if (! GL_EXTCALL(wglGetExtensionsStringARB)) {
     1414            TRACE_(d3d_caps)("wglGetExtensionsStringARB is unavailable\n");
    14071415        } else {
     1416            WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc));
     1417            if (NULL == WGL_Extensions)
     1418                ERR("   WGL_Extensions returns NULL\n");
     1419
     1420            TRACE_(d3d_caps)("WGL_Extensions reported:\n");
    14081421            while (*WGL_Extensions != 0x00) {
    14091422                const char *Start;
    14101423                char ThisExtn[256];
    BOOL InitAdapters(void) {  
    42874300        strcpyW(Adapters[0].DeviceName, DisplayDevice.DeviceName);
    42884301
    42894302        attribute = WGL_NUMBER_PIXEL_FORMATS_ARB;
    4290         GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs));
     4303        if (GL_EXTCALL(wglGetPixelFormatAttribivARB))
     4304            GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs));
     4305        else {
     4306            TRACE("wglGetPixelFormatAttribivARB is unavailable\n");
     4307            Adapters[0].nCfgs = 0;
     4308        }
    42914309
    42924310        Adapters[0].cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Adapters[0].nCfgs *sizeof(WineD3D_PixelFormat));
    42934311        cfgs = Adapters[0].cfgs;

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