- reactivated texture warping.

This commit is contained in:
Christoph Oelckers 2014-05-12 15:13:07 +02:00
parent 55d4c89753
commit 9c659b948c
3 changed files with 5 additions and 7 deletions

View file

@ -94,15 +94,14 @@ void FRenderState::Reset()
//
//==========================================================================
int FRenderState::SetupShader(bool cameratexture, int &shaderindex, float warptime)
int FRenderState::SetupShader(int &shaderindex, float warptime)
{
int softwarewarp = 0;
if (gl.hasGLSL())
{
mEffectState = shaderindex;
mWarpTime = warptime;
if (shaderindex > 0) GLRenderer->mShaderManager->SetWarpSpeed(shaderindex, warptime);
}
else
{

View file

@ -68,7 +68,6 @@ class FRenderState
int mEffectState;
int mColormapState;
float mWarpTime;
int glSrcBlend, glDstBlend;
int glAlphaFunc;
@ -93,7 +92,7 @@ public:
void Reset();
int SetupShader(bool cameratexture, int &shaderindex, float warptime);
int SetupShader(int &shaderindex, float warptime);
void Apply(bool forcenoshader = false);
void SetVertexBuffer(FVertexBuffer *vb)

View file

@ -842,7 +842,7 @@ void FMaterial::Bind(int clampmode, int translation, int overrideshader)
int maxbound = 0;
bool allowhires = tex->xScale == FRACUNIT && tex->yScale == FRACUNIT;
int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, tex->gl_info.shaderspeed);
int softwarewarp = gl_RenderState.SetupShader(shaderindex, tex->gl_info.shaderspeed);
if (tex->bHasCanvas || tex->bWarped) clampmode = 0;
else if (clampmode != -1) clampmode &= 3;
@ -889,7 +889,7 @@ void FMaterial::BindPatch(int translation, int overrideshader, bool alphatexture
int shaderindex = overrideshader > 0? overrideshader : mShaderIndex;
int maxbound = 0;
int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, tex->gl_info.shaderspeed);
int softwarewarp = gl_RenderState.SetupShader(shaderindex, tex->gl_info.shaderspeed);
const FHardwareTexture *glpatch = mBaseLayer->BindPatch(0, translation, softwarewarp, alphatexture);
// The only multitexture effect usable on sprites is the brightmap.