DXGL r246 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r245‎ | r246 | r247 >
Date:22:42, 26 August 2012
Author:admin
Status:new
Tags:
Comment:
Update dxglcfg image in help.
Fix Blt() scaling in 8-bit mode
Update ReadMe.txt
Update release version
Fix 8-bit rendering
Modified paths:
  • /Help/dxglcfg.png (modified) (history)
  • /ReadMe.txt (modified) (history)
  • /common/releasever.h (modified) (history)
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: Help/dxglcfg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: ReadMe.txt
@@ -1,11 +1,11 @@
2 -DXGL 0.3.1
 2+DXGL 0.3.2
33 http://www.williamfeely.info/wiki/DXGL
44
55 == Introduction ==
66
7 -DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL 2.0. It is intended to alleviate some of the graphics glitches inherent with using legacy DirectX interfaces on modern video cards. The API will be 100% binary compatible with the system ddraw.dll file.
 7+DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL 2.x. It is intended to alleviate some of the graphics glitches inherent with using legacy DirectX interfaces on modern video cards. The API will be 100% binary compatible with the system ddraw.dll file.
88
9 -DXGL is currently in an alpha stage of development and very little works at this point.
 9+DXGL is currently in an alpha stage, but several applications and games already work.
1010
1111 == System Requirements ==
1212
@@ -15,16 +15,15 @@
1616
1717 == Build Requirements ==
1818 * Visual Studio 2010 or Visual C++ 2010 Express
19 -* Latest version of Windows SDK may be required
 19+* The following components are optional. The build process will ask for these if they do not exist:
 20+** TortoiseSVN (to fill in revision on SVN builds)
 21+** HTML Help Workshop (to build help)
 22+** NSIS (to build installer, requires TortoiseSVN and HTML Help Workshop to succeed)
2023
2124 == Build Instructions ==
22 -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.
23 -* Install Visual C++ 2010 Express at http://www.microsoft.com/express/downloads/#2010-Visual-CPP
24 -* Install the Windows SDK at:
25 -http://www.microsoft.com/downloads/en/details.aspx?familyid=6b6c21d2-2006-4afa-9702-529fa782d63b
26 -Warning: If you have installed Visual Studio 2010 SP1, install the Windows SDK update at:
27 -http://www.microsoft.com/downloads/en/details.aspx?FamilyID=689655B4-C55D-4F9B-9665-2C547E637B70
28 -* Open the dxgl.sln file, select your build configuration (Debug or Release) in the toolbar, and press F5.
 25+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.
 26+* Install Visual C++ 2010 Express at http://www.microsoft.com/express/downloads/#2010-Visual-CPP .
 27+* Open the dxgl.sln file, select your build configuration (Debug or Release) in the toolbar, and press F7.
2928
3029 == Progress ==
3130 For detailed progress information, please check http://www.williamfeely.info/wiki/DXGL_Features
@@ -33,14 +32,13 @@
3433 * Display mode enumeration and switching (with emulated mode switching)
3534 * Fullscreen and windowed modes.
3635 * Basic Blt() functionality
37 -* 8-bit color with GLSL shader
 36+* 8-bit color emulated with GLSL shader
3837
3938 What partially works:
40 -* SetCooperativeLevel (destroys the GL context if switching between windowed and fullscreen modes)
 39+* 3D graphics are only partially supported, and only advertised in Debug builds.
4140
4241 What doesn't work:
43 -* Most functions are stubbed out and return an error
44 -* 3D Graphics support is very preliminary
 42+* Many functions are stubbed out and return an error
4543
4644 == Installation ==
4745
Index: common/releasever.h
@@ -4,7 +4,7 @@
55
66 #define DXGLMAJORVER 0
77 #define DXGLMINORVER 3
8 -#define DXGLPOINTVER 1
 8+#define DXGLPOINTVER 2
99
1010 #define STR2(x) #x
1111 #define STR(x) STR2(x)
Index: ddraw/glDirectDrawSurface.cpp
@@ -264,7 +264,7 @@
265265 texture->minfilter = texture->magfilter = GL_NEAREST;
266266 else
267267 {
268 - if(dxglcfg.scalingfilter) texture->minfilter = texture->magfilter = GL_LINEAR;
 268+ if(dxglcfg.scalingfilter && (ddInterface->GetBPP() > 8)) texture->minfilter = texture->magfilter = GL_LINEAR;
269269 else texture->minfilter = texture->magfilter = GL_NEAREST;
270270 }
271271 texture->wraps = texture->wrapt = GL_CLAMP_TO_EDGE;
Index: ddraw/glRenderer.cpp
@@ -930,7 +930,8 @@
931931 progtype = PROG_TEXTURE;
932932 glUniform1i(shaders[progtype].tex0,0);
933933 }
934 - SetTexture(0,src->GetTexture());
 934+ if(src) SetTexture(0,src->GetTexture());
 935+ else SetTexture(0,NULL);
935936 glUniform4f(shaders[progtype].view,0,(GLfloat)dest->fakex,0,(GLfloat)dest->fakey);
936937 dest->dirty |= 2;
937938 EnableArray(shaders[progtype].pos,true);