DXGL r781 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r780‎ | r781 | r782 >
Date:04:16, 17 December 2017
Author:admin
Status:new
Tags:
Comment:
Separate Blt filter from screen filter.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)
  • /ddraw/glTexture.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -3191,7 +3191,7 @@
31923192 glUtil_SetTexture(This->util, 8, cmd->src);
31933193 if(This->ext->GLEXT_ARB_sampler_objects)
31943194 {
3195 - if((dxglcfg.scalingfilter == 0) || (This->ddInterface->GetBPP() == 8))
 3195+ if((dxglcfg.BltScale == 0) || (This->ddInterface->GetBPP() == 8))
31963196 glTexture__SetFilter(cmd->src, 8, GL_NEAREST, GL_NEAREST, This);
31973197 else glTexture__SetFilter(cmd->src, 8, GL_LINEAR, GL_LINEAR, This);
31983198 }
Index: ddraw/glTexture.cpp
@@ -1001,9 +1001,18 @@
10021002 This->minfilter = This->magfilter = GL_NEAREST;
10031003 else
10041004 {
1005 - if (dxglcfg.scalingfilter && (glRenderer_GetBPP(This->renderer) > 8))
1006 - This->minfilter = This->magfilter = GL_LINEAR;
1007 - else This->minfilter = This->magfilter = GL_NEAREST;
 1005+ if (This->levels[0].ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
 1006+ {
 1007+ if (dxglcfg.scalingfilter && (glRenderer_GetBPP(This->renderer) > 8))
 1008+ This->minfilter = This->magfilter = GL_LINEAR;
 1009+ else This->minfilter = This->magfilter = GL_NEAREST;
 1010+ }
 1011+ else
 1012+ {
 1013+ if (dxglcfg.BltScale && (glRenderer_GetBPP(This->renderer) > 8))
 1014+ This->minfilter = This->magfilter = GL_LINEAR;
 1015+ else This->minfilter = This->magfilter = GL_NEAREST;
 1016+ }
10081017 }
10091018 This->wraps = This->wrapt = GL_CLAMP_TO_EDGE;
10101019 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, This->minfilter);