DXGL r387 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r386‎ | r387 | r388 >
Date:01:59, 24 June 2013
Author:admin
Status:new
Tags:
Comment:
Fix screen filtering with sampler objects.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -1133,7 +1133,11 @@
11341134 SetTexture(0,texture);
11351135 glUniform1i(shaders[progtype].tex0,0);
11361136 }
1137 - if(GLEXT_ARB_sampler_objects) ((glDirectDrawSurface7*)NULL)->SetFilter(1,GL_NEAREST,GL_NEAREST);
 1137+ if(GLEXT_ARB_sampler_objects)
 1138+ {
 1139+ ((glDirectDrawSurface7*)NULL)->SetFilter(0,GL_NEAREST,GL_NEAREST);
 1140+ ((glDirectDrawSurface7*)NULL)->SetFilter(1,GL_NEAREST,GL_NEAREST);
 1141+ }
11381142 }
11391143 else
11401144 {
@@ -1142,6 +1146,7 @@
11431147 SetTexture(0,texture);
11441148 glUniform1i(shaders[progtype].tex0,0);
11451149 }
 1150+ if(dxglcfg.scalingfilter && GLEXT_ARB_sampler_objects) ((glDirectDrawSurface7*)NULL)->SetFilter(0,GL_LINEAR,GL_LINEAR);
11461151 SetViewport(viewport[0],viewport[1],viewport[2],viewport[3]);
11471152 glUniform4f(shaders[progtype].view,view[0],view[1],view[2],view[3]);
11481153 if(ddInterface->GetFullscreen())