[D3D 97] Some misc fixes...
Lionel Ulmer
lionel.ulmer at free.fr
Thu Mar 6 16:06:19 CST 2003
This time with a patch that builds without OpenGL :-)
Changelog:
- some Caps clean-up when no OpenGL compiled in
- fix some fonts displaying problems
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
--- ../wine_base/dlls/ddraw/d3ddevice/mesa.c Thu Mar 6 23:01:34 2003
+++ dlls/ddraw/d3ddevice/mesa.c Sun Feb 23 20:58:18 2003
@@ -2069,6 +2042,15 @@
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
+ /* See the OpenGL Red Book for an explanation of the following translation (in the OpenGL
+ Correctness Tips section).
+
+ Basically, from what I understood, if the game does not filter the font texture,
+ as the 'real' pixel will lie at the middle of the two texels, OpenGL may choose the wrong
+ one and we will have strange artifacts (as the rounding and stuff may give different results
+ for different pixels, ie sometimes take the left pixel, sometimes the right).
+ */
+ glTranslatef(0.375, 0.375, 0);
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(trans_mat);
}
--- ../wine_base/dlls/ddraw/ddraw/user.c Thu Mar 6 23:01:34 2003
+++ dlls/ddraw/ddraw/user.c Thu Mar 6 23:03:36 2003
@@ -172,7 +174,11 @@
| DDFXCAPS_BLTSHRINKY | DDFXCAPS_BLTSHRINKXN \
| DDFXCAPS_BLTSTRETCHX | DDFXCAPS_BLTSTRETCHXN \
| DDFXCAPS_BLTSTRETCHY | DDFXCAPS_BLTSTRETCHYN)
- This->caps.dwCaps |= DDCAPS_GDI | DDCAPS_PALETTE | BLIT_CAPS /* Hack for D3D code */ | DDCAPS_3D;
+ This->caps.dwCaps |= DDCAPS_GDI | DDCAPS_PALETTE | BLIT_CAPS;
+#ifdef HAVE_OPENGL
+ /* Hack for D3D code */
+ This->caps.dwCaps |= DDCAPS_3D;
+#endif /* HAVE_OPENGL */
This->caps.dwCaps2 |= DDCAPS2_CERTIFIED | DDCAPS2_NOPAGELOCKREQUIRED |
DDCAPS2_PRIMARYGAMMA | DDCAPS2_WIDESURFACES;
This->caps.dwCKeyCaps |= CKEY_CAPS;
@@ -193,8 +199,12 @@
DDSCAPS_FLIP | DDSCAPS_FRONTBUFFER |
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_PALETTE |
DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY |
- DDSCAPS_VIDEOMEMORY | DDSCAPS_VISIBLE | /* Hacks for D3D code */
- DDSCAPS_3DDEVICE | DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_ZBUFFER;
+ DDSCAPS_VIDEOMEMORY | DDSCAPS_VISIBLE;
+#ifdef HAVE_OPENGL
+ /* Hacks for D3D code */
+ This->caps.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE | DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_ZBUFFER;
+#endif /* HAVE_OPENGL */
+
This->caps.ddsOldCaps.dwCaps = This->caps.ddsCaps.dwCaps;
#undef BLIT_CAPS
#undef CKEY_CAPS
More information about the wine-patches
mailing list