VirtualBox

Ignore:
Timestamp:
Mar 25, 2009 1:26:59 PM (16 years ago)
Author:
vboxsync
Message:

crOpenGL: fix for intel 965/963 host drivers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r17482 r18255  
    858858            }
    859859
    860             render_spu.ws.wglMakeCurrent( window->device_context, context->hRC );
     860            if (!render_spu.ws.wglMakeCurrent(window->device_context, context->hRC))
     861            {
     862                DWORD err = GetLastError();
     863                crWarning("Render SPU: (MakeCurrent) failed to make 0x%x, 0x%x cureent with 0x%x error.", window->device_context, context->hRC, err);
     864
     865                /* Workaround for Intel drivers, which report support for wglChoosePixelFormatEXT, but it doesn't work. */
     866                if ((err==ERROR_INVALID_PIXEL_FORMAT) && (!context->everCurrent))
     867                {
     868                    crDebug("Trying to resetup pixel format");
     869                    if (!bSetupPixelFormatNormal(window->device_context, context->visual->visAttribs))
     870                    {
     871                        crWarning("Failed to resetup pixel format");
     872                    }
     873
     874                    if (!render_spu.ws.wglMakeCurrent(window->device_context, context->hRC))
     875                    {
     876                        crError("Can't make context current");
     877                    }
     878                    else
     879                    {
     880                        crInfo("Render SPU: (MakeCurrent) passed after pixel format reset");
     881                    }
     882                }
     883            }
    861884        }
    862885
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