VirtualBox

Changeset 46528 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jun 13, 2013 12:32:47 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86384
Message:

crOpenGL: remove viewport hack as it is no longer needed

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r44457 r46528  
    4848#endif
    4949
    50 #ifdef WINDOWS
    51 static char* gsViewportHackApps[] = {"googleearth.exe", NULL};
    52 #endif
    53 
    5450static bool stub_initialized = 0;
    5551#ifdef WINDOWS
     
    247243    stubCheckWindowsState();
    248244    /* call the original SPU glViewport function */
    249     if (!stub.viewportHack)
    250     {
    251         origViewport(x, y, w, h);
    252     }
    253     else
    254     {
    255         ContextInfo *context = stubGetCurrentContext();
    256         int winX, winY;
    257         unsigned int winW, winH;
    258         WindowInfo *pWindow;
    259         pWindow = context->currentDrawable;
    260         stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
    261         origViewport(0, 0, winW, winH);
    262     }
     245    origViewport(x, y, w, h);
    263246}
    264247
     
    305288        stub.spuDispatch.Viewport = trapViewport;
    306289
    307         if (stub.viewportHack)
    308             stub.spuDispatch.Scissor = trapScissor;
    309290        /*stub.spuDispatch.SwapBuffers = trapSwapBuffers;
    310291        stub.spuDispatch.DrawBuffer = trapDrawBuffer;*/
     
    753734    crNetSetKey(key,sizeof(key));
    754735    stub.force_pbuffers = 0;
    755     stub.viewportHack = 0;
    756 
    757 #ifdef WINDOWS
    758     {
    759         char name[1000];
    760         int i;
    761 
     736
     737#ifdef WINDOWS
    762738# ifdef VBOX_WITH_WDDM
    763         stub.bRunningUnderWDDM = false;
     739    stub.bRunningUnderWDDM = false;
    764740# endif
    765         /* Apply viewport hack only if we're running under wine */
    766         if (NULL!=GetModuleHandle("wined3d.dll") || NULL != GetModuleHandle("wined3dwddm.dll"))
    767         {
    768             crGetProcName(name, 1000);
    769             for (i=0; gsViewportHackApps[i]; ++i)
    770             {
    771                 if (!stricmp(name, gsViewportHackApps[i]))
    772                 {
    773                     stub.viewportHack = 1;
    774                     break;
    775                 }
    776             }
    777         }
    778     }
    779741#endif
    780742}
  • trunk/src/VBox/Additions/common/crOpenGL/stub.h

    r43487 r46528  
    223223    char *spu_dir;
    224224    int force_pbuffers;
    225     int viewportHack;
    226225
    227226    /* thread safety stuff */
Note: See TracChangeset for help on using the changeset viewer.

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