VirtualBox

Ignore:
Timestamp:
Feb 21, 2011 9:58:26 AM (14 years ago)
Author:
vboxsync
Message:

wined3d/wddm: fix 1 pixel distortion for 2d games under wddm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c

    r33656 r36029  
    39083908        checkGLcall("glOrtho");
    39093909
    3910         /* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */
    3911         glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f);
    3912         checkGLcall("glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f)");
    3913 
    39143910        /* D3D texture coordinates are flipped compared to OpenGL ones, so
    39153911         * render everything upside down when rendering offscreen. */
    39163912        if (context->render_offscreen)
    39173913        {
     3914            /* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */
     3915            glTranslatef(63.0f / 128.0f, -63.0f / 128.0f, 0.0f);
     3916            checkGLcall("glTranslatef(63.0f / 128.0f, -63.0f / 128.0f, 0.0f)");
    39183917            glScalef(1.0f, -1.0f, 1.0f);
    39193918            checkGLcall("glScalef");
     3919        }
     3920        else
     3921        {
     3922            /* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */
     3923            glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f);
     3924            checkGLcall("glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f)");
    39203925        }
    39213926    } else {
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