DXGL r730 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r729‎ | r730 | r731 >
Date:04:29, 24 July 2017
Author:admin
Status:new
Tags:
Comment:
Implement debug option to disable GLSL 1.30 support.
Modified paths:
  • /ddraw/ShaderGen2D.cpp (modified) (history)
  • /ddraw/glDirectDraw.cpp (modified) (history)

Diff [purge]

Index: ddraw/ShaderGen2D.cpp
@@ -1,5 +1,5 @@
22 // DXGL
3 -// Copyright (C) 2013-2016 William Feely
 3+// Copyright (C) 2013-2017 William Feely
44
55 // This library is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU Lesser General Public
@@ -19,6 +19,7 @@
2020 #include "glExtensions.h"
2121 #include "ShaderGen2d.h"
2222 #include "../common/version.h"
 23+extern "C" {extern DXGLCFG dxglcfg; }
2324
2425
2526 /* Bits in 2D shader ID:
@@ -724,7 +725,7 @@
725726 if (id & DDBLT_ROP)
726727 {
727728 rop = UnpackROPBits(id);
728 - if (gen->ext->glver_major >= 3)
 729+ if ((gen->ext->glver_major >= 3) && !dxglcfg.DebugNoGLSL130)
729730 {
730731 String_Append(vsrc, version_130);
731732 intproc = TRUE;
@@ -797,7 +798,7 @@
798799 String_Append(fsrc, revheader);
799800 if (id & DDBLT_ROP)
800801 {
801 - if (gen->ext->glver_major >= 3)
 802+ if ((gen->ext->glver_major >= 3) && !dxglcfg.DebugNoGLSL130)
802803 {
803804 String_Append(fsrc, version_130);
804805 intproc = true;
Index: ddraw/glDirectDraw.cpp
@@ -1,5 +1,5 @@
22 // DXGL
3 -// Copyright (C) 2011-2016 William Feely
 3+// Copyright (C) 2011-2017 William Feely
44
55 // This library is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU Lesser General Public
@@ -1302,7 +1302,7 @@
13031303 mode.dmSize = sizeof(DEVMODE);
13041304 EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &mode);
13051305 glRenderer_Init(tmprenderer, 16, 16, mode.dmBitsPerPel, false, mode.dmDisplayFrequency, hGLWnd, NULL, FALSE);
1306 - if (tmprenderer->ext->glver_major >= 3) fullrop = TRUE;
 1306+ if ((tmprenderer->ext->glver_major >= 3) && !dxglcfg.DebugNoGLSL130) fullrop = TRUE;
13071307 if (tmprenderer->ext->GLEXT_EXT_gpu_shader4) fullrop = TRUE;
13081308 glRenderer_Delete(tmprenderer);
13091309 free(tmprenderer);
@@ -1309,7 +1309,7 @@
13101310 }
13111311 else
13121312 {
1313 - if (renderer->ext->glver_major >= 3) fullrop = TRUE;
 1313+ if ((renderer->ext->glver_major >= 3) && !dxglcfg.DebugNoGLSL130) fullrop = TRUE;
13141314 if (renderer->ext->GLEXT_EXT_gpu_shader4) fullrop = TRUE;
13151315 }
13161316 if (fullrop)