Index: ReadMe.md |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | # DXGL 0.5.16
|
3 | | -https://www.dxgl.org
|
| 3 | +https://dxgl.org
|
4 | 4 |
|
5 | 5 | ## Introduction
|
6 | 6 | DXGL is a free replacement for the Windows ddraw.dll library, running on OpenGL. It is designed to overcome driver bugs, particularly in Windows Vista and newer operating systems. It also adds various enhancements to the graphics output such as display scaling and filtering options. DXGL supports the DirectX 7.0 graphics APIs, however it is currently under development and many programs are not yet compatible with DXGL.
|
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | If you wish to migrate any old profiles generated after installing DXGL 0.5.9 or later, you will need to use Regedit to delete the "Configuration Version" registry value from the HKEY_CURRENT_USER\SOFTWARE\DXGL registry key to force the upgrade to be run again.
|
12 | 12 |
|
13 | 13 | ## GitHub Notice
|
14 | | -If you downloaded the DXGL source code from GitHub, please note that when compiling DXGL, the version number will not indicate the revision number. This issue is also present when compiling from a zipped source code distribution from the www.dxgl.org, www.dxgl.info, or www.williamfeely.info website.
|
| 14 | +If you downloaded the DXGL source code from GitHub, please note that when compiling DXGL, the version number will not indicate the revision number. This issue is also present when compiling from a zipped source code distribution from the dxgl.org, www.dxgl.info, or www.williamfeely.info website.
|
15 | 15 |
|
16 | 16 | ## System Requirements
|
17 | 17 |
|
— | — | @@ -23,12 +23,12 @@ |
24 | 24 | * Requires support for hardware accelerated non-power-of-two textures
|
25 | 25 | * OpenGL 3.2 or higher recommended.
|
26 | 26 | * The standard build requires a SSE2-capable processor; older processors require the legacy build.
|
27 | | -* For the standard build, Visual C++ 2017 x86 runtime, available at https://aka.ms/vs/15/release/vc_redist.x86.exe (note this link may track visitors) (will be installed if not present)
|
| 27 | +* For the standard build, Visual C++ 2019 x86 runtime, available at https://aka.ms/vs/16/release/vc_redist.x86.exe (note this link may track visitors) (will be installed if not present)
|
28 | 28 | * For the legacy build, Visual C++ 2010 x86 runtime, available at https://www.microsoft.com/en-us/download/details.aspx?id=8328 (will be installed if not present)
|
29 | 29 |
|
30 | 30 | ## Build Requirements
|
31 | | -* For the legacy build, Visual Studio 2010 or Visual C++ 2010 Express Edition.
|
32 | | -* For the standard build, Visual Studio 2017, Community or higher, Update 8.
|
| 31 | +* For the legacy build, Visual Studio 2010 or Visual C++ 2010 Express Edition with Service Pack 1.
|
| 32 | +* For the standard build, Visual Studio 2019, Community or higher.
|
33 | 33 | * The following components are optional. The build process will ask for these if they do not exist:
|
34 | 34 | * TortoiseSVN (to fill in revision on SVN builds)
|
35 | 35 | * HTML Help Workshop (to build help)
|
— | — | @@ -36,10 +36,10 @@ |
37 | 37 |
|
38 | 38 | ## Build Instructions
|
39 | 39 | These instructions assume that you do not have any of the required software installed. If you already have any or all of this software installed and set up, skip those steps.
|
40 | | -* Install Visual Studio 2017 Community at https://visualstudio.microsoft.com/
|
| 40 | +* Install Visual Studio 2019 Community at https://visualstudio.microsoft.com/
|
41 | 41 | * Install TortoiseSVN from https://tortoisesvn.net/
|
42 | 42 | * Install HTML Help Workshop from https://www.microsoft.com/en-us/download/details.aspx?id=21138
|
43 | | -* Install NSIS from http://nsis.sourceforge.net/Main_Page
|
| 43 | +* Install NSIS from https://nsis.sourceforge.io/Main_Page
|
44 | 44 | * Open the dxgl.sln file, select your build configuration (Debug or Release) in the toolbar, and press F7 to build.
|
45 | 45 |
|
46 | 46 | ## Progress
|
— | — | @@ -50,9 +50,11 @@ |
51 | 51 | * Fullscreen and windowed modes.
|
52 | 52 | * Basic Blt() functionality
|
53 | 53 | * 8-bit color emulated with GLSL shader
|
| 54 | +* Packed-pixel YUV surfaces (currently only supported by Blt() to an RGB surface)
|
54 | 55 |
|
55 | 56 | What partially works:
|
56 | 57 | * 3D graphics are only partially supported.
|
| 58 | +* Overlay support is currently in development and not yet enabled.
|
57 | 59 |
|
58 | 60 | What doesn't work:
|
59 | 61 | * Many functions are stubbed out and return an error
|
— | — | @@ -65,15 +67,17 @@ |
66 | 68 | ## SVN
|
67 | 69 |
|
68 | 70 | SVN readonly access is available at:
|
69 | | -https://www.dxgl.org/svn/dxgl/
|
| 71 | +https://dxgl.org/svn/dxgl/
|
| 72 | +Alternate URL at:
|
| 73 | +https://dxgl.org:8443/svn/dxgl/
|
70 | 74 |
|
71 | 75 | There is a Mediawiki-based SVN log at:
|
72 | | -https://www.dxgl.info/wiki/Special:Code/DXGL
|
| 76 | +https://dxgl.org/wiki/Special:Code/DXGL
|
73 | 77 |
|
74 | 78 | ## AppDB
|
75 | 79 |
|
76 | 80 | An AppDB system (similar to that on winehq.org) is now available at:
|
77 | | -https://www.dxgl.info/appdb/
|
| 81 | +https://dxgl.org/appdb/
|
78 | 82 |
|
79 | 83 | This requires a user account separate from the other services.
|
80 | 84 |
|
Index: dxglcfg/surfacegen.cpp |
— | — | @@ -272,6 +272,94 @@ |
273 | 273 | unsigned long *buffer32 = (unsigned long*) buffer;
|
274 | 274 | switch(ddsd.ddpfPixelFormat.dwRGBBitCount)
|
275 | 275 | {
|
| 276 | + case 0:
|
| 277 | + if (ddsd.ddpfPixelFormat.dwFlags & DDPF_FOURCC)
|
| 278 | + {
|
| 279 | + switch (ddsd.ddpfPixelFormat.dwFourCC)
|
| 280 | + {
|
| 281 | + case MAKEFOURCC('Y', '8', ' ', ' '):
|
| 282 | + case MAKEFOURCC('Y', '8', '0', '0'):
|
| 283 | + case MAKEFOURCC('G', 'R', 'E', 'Y'):
|
| 284 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 285 | + {
|
| 286 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 287 | + {
|
| 288 | + buffer[x + (ddsd.lPitch * y)] = (unsigned char)((x / (ddsd.dwWidth / 16.)) + 16 * floor((y / (ddsd.dwHeight / 16.))));
|
| 289 | + }
|
| 290 | + }
|
| 291 | + break;
|
| 292 | + case MAKEFOURCC('Y', '1', '6', ' '):
|
| 293 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 294 | + {
|
| 295 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 296 | + {
|
| 297 | + buffer16[x + ((ddsd.lPitch / 2) * y)] = (unsigned short)((x / (ddsd.dwWidth / 256.)) + 256 * floor((y / (ddsd.dwHeight / 256.))));
|
| 298 | + }
|
| 299 | + }
|
| 300 | + break;
|
| 301 | + case MAKEFOURCC('U', 'Y', 'V', 'Y'):
|
| 302 | + case MAKEFOURCC('U', 'Y', 'N', 'V'):
|
| 303 | + case MAKEFOURCC('Y', '4', '2', '2'):
|
| 304 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 305 | + {
|
| 306 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 307 | + {
|
| 308 | + buffer16[x + ((ddsd.lPitch / 2) * y)] = EncodeUYVY((unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.)))), x);
|
| 309 | + }
|
| 310 | + }
|
| 311 | + break;
|
| 312 | + case MAKEFOURCC('Y', 'U', 'Y', '2'):
|
| 313 | + case MAKEFOURCC('Y', 'U', 'Y', 'V'):
|
| 314 | + case MAKEFOURCC('Y', 'U', 'N', 'V'):
|
| 315 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 316 | + {
|
| 317 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 318 | + {
|
| 319 | + buffer16[x + ((ddsd.lPitch / 2) * y)] = EncodeYUYV((unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.)))), x);
|
| 320 | + }
|
| 321 | + }
|
| 322 | + break;
|
| 323 | + case MAKEFOURCC('Y', 'V', 'Y', 'U'):
|
| 324 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 325 | + {
|
| 326 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 327 | + {
|
| 328 | + buffer16[x + ((ddsd.lPitch / 2) * y)] = EncodeYVYU((unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.)))), x);
|
| 329 | + }
|
| 330 | + }
|
| 331 | + break;
|
| 332 | + case MAKEFOURCC('R', 'G', 'B', 'G'):
|
| 333 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 334 | + {
|
| 335 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 336 | + {
|
| 337 | + buffer16[x + ((ddsd.lPitch / 2) * y)] = EncodeRGBG((unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.)))), x);
|
| 338 | + }
|
| 339 | + }
|
| 340 | + break;
|
| 341 | + case MAKEFOURCC('G', 'R', 'G', 'B'):
|
| 342 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 343 | + {
|
| 344 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 345 | + {
|
| 346 | + buffer16[x + ((ddsd.lPitch / 2) * y)] = EncodeGRGB((unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.)))), x);
|
| 347 | + }
|
| 348 | + }
|
| 349 | + break;
|
| 350 | + case MAKEFOURCC('A', 'Y', 'U', 'V'):
|
| 351 | + for (y = 0; y < ddsd.dwHeight; y++)
|
| 352 | + {
|
| 353 | + for (x = 0; x < ddsd.dwWidth; x++)
|
| 354 | + {
|
| 355 | + buffer32[x + ((ddsd.lPitch / 4) * y)] = EncodeAYUV((unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.)))));
|
| 356 | + }
|
| 357 | + }
|
| 358 | + break;
|
| 359 | + default:
|
| 360 | + break;
|
| 361 | + }
|
| 362 | + }
|
| 363 | + break;
|
276 | 364 | case 1:
|
277 | 365 | for(y = 0; y < ddsd.dwHeight; y++)
|
278 | 366 | {
|