Skip to content

Commit

Permalink
Add single buffer display mode (INI and registry only currently).
Browse files Browse the repository at this point in the history
Remove beta items from example INI.
Mention link to dxgl.info online help in the CHM help.
Remove beta flag from version info.

git-svn-id: https://www.williamfeely.info/svn/dxgl@747 8a90861a-4eca-46d5-b744-240ff16d0c4d
  • Loading branch information
dxgldotorg committed Sep 15, 2017
1 parent fc97a38 commit 5c36b06
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 78 deletions.
4 changes: 2 additions & 2 deletions Help/introduction.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
Expand All @@ -7,7 +7,7 @@
</head>
<body id="preview">
<h1>DXGL</h1>
<p><a href="https://www.dxgl.info">https://www.dxgl.info</a></p>
<p>View help online at <a href="https://www.dxgl.info/help/">https://www.dxgl.info/help/</a></p>
<h2>Introduction</h2>
<p>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.</p>
<h2>Updgrade notes</h2>
Expand Down
6 changes: 6 additions & 0 deletions cfgmgr/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ Method used to upload textures
Valid settings:
0 - Automatic

Member SingleBufferDevice
INI Entry SingleBufferDevice
INI Group advanced
REG_DWORD HKCU\DXGL\Profiles\<app>\SingleBufferDevice
If true, do not use double buffering in OpenGL.

Default for all Debug variables is 0 or FALSE.

Member DebugNoExtFramebuffer
Expand Down
3 changes: 3 additions & 0 deletions cfgmgr/cfgmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ void ReadSettings(HKEY hKey, DXGLCFG *cfg, DXGLCFG *mask, BOOL global, BOOL dll,
cfg->vsync = ReadDWORD(hKey,cfg->vsync,&cfgmask->vsync,_T("VSync"));
cfg->TextureFormat = ReadDWORD(hKey,cfg->TextureFormat,&cfgmask->TextureFormat,_T("TextureFormat"));
cfg->TexUpload = ReadDWORD(hKey,cfg->TexUpload,&cfgmask->TexUpload,_T("TexUpload"));
cfg->SingleBufferDevice = ReadBool(hKey,cfg->SingleBufferDevice,&cfgmask->SingleBufferDevice,_T("SingleBufferDevice"));
cfg->Windows8Detected = ReadBool(hKey,cfg->Windows8Detected,&cfgmask->Windows8Detected,_T("Windows8Detected"));
cfg->DPIScale = ReadDWORD(hKey,cfg->DPIScale,&cfgmask->DPIScale,_T("DPIScale"));
cfg->aspect = ReadFloat(hKey, cfg->aspect, &cfgmask->aspect, _T("ScreenAspect"));
Expand Down Expand Up @@ -678,6 +679,7 @@ void WriteSettings(HKEY hKey, const DXGLCFG *cfg, const DXGLCFG *mask, BOOL glob
WriteDWORD(hKey,cfg->vsync,cfgmask->vsync,_T("VSync"));
WriteDWORD(hKey,cfg->TextureFormat,cfgmask->TextureFormat,_T("TextureFormat"));
WriteDWORD(hKey,cfg->TexUpload,cfgmask->TexUpload,_T("TexUpload"));
WriteBool(hKey,cfg->SingleBufferDevice,cfgmask->SingleBufferDevice,_T("SingleBufferDevice"));
WriteBool(hKey,cfg->Windows8Detected,cfgmask->Windows8Detected,_T("Windows8Detected"));
WriteDWORD(hKey,cfg->DPIScale,cfgmask->DPIScale,_T("DPIScale"));
WriteFloat(hKey, cfg->aspect, cfgmask->aspect, _T("ScreenAspect"));
Expand Down Expand Up @@ -909,6 +911,7 @@ int ReadINICallback(DXGLCFG *cfg, const char *section, const char *name,
if (!stricmp(name, "VSync")) cfg->vsync = INIIntValue(value);
if (!stricmp(name, "TextureFormat")) cfg->TextureFormat = INIIntValue(value);
if (!stricmp(name, "TexUpload")) cfg->TexUpload = INIIntValue(value);
if (!stricmp(name, "SingleBufferDevice")) cfg->SingleBufferDevice = INIBoolValue(value);
}
if (!stricmp(section, "debug"))
{
Expand Down
1 change: 1 addition & 0 deletions cfgmgr/cfgmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ typedef struct
DWORD vsync;
DWORD TextureFormat;
DWORD TexUpload;
BOOL SingleBufferDevice;
// [debug]
BOOL DebugNoExtFramebuffer;
BOOL DebugNoArbFramebuffer;
Expand Down
2 changes: 1 addition & 1 deletion common/releasever.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define DXGLMAJORVER 0
#define DXGLMINORVER 5
#define DXGLPOINTVER 12
#define DXGLBETA 1
#define DXGLBETA 0

#define STR2(x) #x
#define STR(x) STR2(x)
Expand Down
6 changes: 4 additions & 2 deletions ddraw/glRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,8 @@ BOOL glRenderer__InitGL(glRenderer *This, int width, int height, int bpp, int fu
ZeroMemory(&pfd,sizeof(PIXELFORMATDESCRIPTOR));
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
if (dxglcfg.SingleBufferDevice) pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
else pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = bpp;
pfd.iLayerType = PFD_MAIN_PLANE;
Expand Down Expand Up @@ -3733,7 +3734,8 @@ void glRenderer__SetWnd(glRenderer *This, int width, int height, int bpp, int fu
ZeroMemory(&pfd,sizeof(PIXELFORMATDESCRIPTOR));
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
if (dxglcfg.SingleBufferDevice) pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
else pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = bpp;
pfd.iLayerType = PFD_MAIN_PLANE;
Expand Down
80 changes: 7 additions & 73 deletions dxgl-example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -92,50 +92,17 @@ ChangeColorDepth = false
; AllColorDepths - Boolean
; Adds 8, 16, 24, and 32-bit color modes if they are not already
; added to the list of display modes passed to the program.
; (future)Equivalent to setting AddColorDepths to 21.
; (future)Overridden by AddColorDepths.
; Default is true if Windows 8 or higher is detected, false otherwise.
AllColorDepths = true

; AddColorDepths - Integer
; (future) Adds additional color modes if they are not already
; added to the list of display modes passed to the program.
; This is a bit-mapped variable, add up the desired color depths from
; the list of values below:
; 1 - Add 8-bit modes
; 2 - Add 15-bit modes
; 4 - Add 16-bit modes
; 8 - Add 24-bit modes
; 16 - Add 32-bit modes
; Default is 21 if Windows 8 or higher is detected, 0 otherwise.
; Adding both 15 and 16 bit modes at the same time may cause
; crashes or undefined behavior in some programs.
AddColorDepths = 21

; ExtraModes - Boolean
; Adds additional video modes to the list of resolutions.
; If a display scaling mode is not set and postprocess scaling
; is set to automatic, it will add several low resolution pixel doubled
; video modes.
; Default is true.
; (future)Equivalent to setting AddModes to 7. Overridden by AddModes.
ExtraModes = true

; AddModes - Integer
; (future) Adds additional video modes to the list of resolutions.
; This is a bitmapped variable, add up the desired mode lists from
; the list of values below:
; 0 - None
; 1 - Add common low-resolution modes
; 2 - Add less common low-resolution modes
; 4 - Add uncommon standard definition modes
; 8 - Add high definition modes
; 16 - Add QHD to UHD modes.
; 32 - Add over-4K UHD modes. Check GPU specifications before enabling.
; 64 - Add very uncommon resolutions of all dimensions.
; Default is 1.
AddModes = 1

; SortModes - Integer
; Determines whether or not to sort display modes by either
; resolution first or color depth first. This can make in-game
Expand Down Expand Up @@ -166,31 +133,9 @@ ScalingFilter = 0
; The following values are valid:
; 0 - Use native primary surface size. Most compatible.
; 1 - Adjust primary surface size to match display.
; The following will be added in the future:
; 2 - Adjust primary surface to nearest integer multiple of native.
; 3 - Use exact 1.5x scale.
; 4 - Use exact 2x scale.
; 5 - Use exact 2.5x scale.
; 6 - Use exact 3x scale.
; 7 - Use exact 4x scale.
; 8 - Use custom scale.
; Default is 0.
AdjustPrimaryResolution = 0

; PrimaryScaleX - Floating point
; (future) Sets the scaling amount in the X dimension for custom primary
; buffer scaling.
; If zero, negative, or an invalid value, will be interpreted as 1.0
; Default is 1.0
PrimaryScaleX = 1.0

; PrimaryScaleY - Floating point
; (future) Sets the scaling amount in the Y dimension for custom primary
; buffer scaling.
; If zero, negative, or an invalid value, will be interpreted as 1.0
; Default is 1.0
PrimaryScaleY = 1.0

; ScreenAspect - Floating point or string
; Sets the aspect ratio of the display output.
; May be entered as a floating point number or as aspect ratio notation.
Expand Down Expand Up @@ -223,9 +168,7 @@ DPIScale = 1
[postprocess]
; PostprocessFilter - Integer
; Selects the filter to use for the postprocess pass.
; (future)If a post processing shader is selected this will be clamped to 1
; or overridden by the shader metadata.
; This will be ignored if there is no
; This will be ignored if there is no postprocess pass or scaling is 1.
; The following values are valid:
; 0 - Nearest-neighbor stretching
; 1 - Bilinear interpolation
Expand All @@ -249,21 +192,6 @@ PostprocessScaleX = 0.0
; Default is 0.0
PostprocessScaleY = 0.0

; EnableShader - Boolean
; (future) If true, uses a custom shader to render the postprocess pass.
; Default is false
EnableShader = false

; ShaderFile - String
; (future)Path to a file containing either a GLSL fragment shader or a
; to-be-determined metadata file containing a shader pipeline and certain
; parameters.
; The path can be relative (will search the Shaders subdirectory of the
; install directory and the path where the ddraw.dll implementation has been
; placed) or absolute.
; Default is undefined.
; ShaderFile = example.fs

[d3d]
; TextureFilter - Integer
; Texture filtering method for Direct3D draw commands.
Expand Down Expand Up @@ -340,6 +268,12 @@ TextureFormat = 0
; currently 0.
TexUpload = 0

; SingleBufferDevice - Boolean
; If true, creates an OpenGL device without double buffering. This has
; various effects, such as disabling vsync and exclusive fullscreen.
; Default is false
SingleBufferDevice = false

[debug]
; DebugNoExtFramebuffer - Boolean
; Disables use of the EXT_framebuffer_object OpenGL extension.
Expand Down

0 comments on commit 5c36b06

Please sign in to comment.