diff --git a/source/build/src/mdsprite.cpp b/source/build/src/mdsprite.cpp index da515dc92..44c6a1633 100644 --- a/source/build/src/mdsprite.cpp +++ b/source/build/src/mdsprite.cpp @@ -1730,7 +1730,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr) } #endif int palid = TRANSLATION(Translation_Remap + curbasepal, globalpal); - GLInterface.SetTexture(-1, tex, palid, 0, CLAMP_XY); + GLInterface.SetTexture(-1, tex, palid, CLAMP_XY); if (tspr->clipdist & TSPR_FLAGS_MDHACK) { diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 68948fa96..2e24c3557 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -402,7 +402,7 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32 int palid = TRANSLATION(Translation_Remap + curbasepal, globalpal); - bool success = GLInterface.SetTexture(globalpicnum, tileGetTexture(globalpicnum), palid, method, sampleroverride); + bool success = GLInterface.SetTexture(globalpicnum, tileGetTexture(globalpicnum), palid, sampleroverride); if (!success) { tsiz.x = tsiz.y = 1; @@ -4352,7 +4352,7 @@ static void polymost_precache(int32_t dapicnum, int32_t dapalnum, int32_t datype //Printf("precached %d %d type %d\n", dapicnum, dapalnum, datype); hicprecaching = 1; int palid = TRANSLATION(Translation_Remap + curbasepal, dapalnum); - GLInterface.SetTexture(dapicnum, tileGetTexture(dapicnum), palid, 0, -1); + GLInterface.SetTexture(dapicnum, tileGetTexture(dapicnum), palid, CLAMP_NONE); hicprecaching = 0; if (datype == 0 || !hw_models) return; @@ -4367,7 +4367,7 @@ static void polymost_precache(int32_t dapicnum, int32_t dapalnum, int32_t datype { auto tex = mdloadskin((md2model_t *)models[mid], 0, dapalnum, i, nullptr); int palid = TRANSLATION(Translation_Remap + curbasepal, dapalnum); - if (tex) GLInterface.SetTexture(-1, tex, palid, 0, -1); + if (tex) GLInterface.SetTexture(-1, tex, palid, CLAMP_NONE); } } diff --git a/source/build/src/voxmodel.cpp b/source/build/src/voxmodel.cpp index 262470f42..db542102f 100644 --- a/source/build/src/voxmodel.cpp +++ b/source/build/src/voxmodel.cpp @@ -1154,7 +1154,7 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr) GLInterface.SetPalswap(globalpal); // The texture here is already translated. - GLInterface.SetTexture(-1, htex, 0/*TRANSLATION(Translation_Remap + curbasepal, globalpal)*/, 0, CLAMP_NOFILTER_XY); + GLInterface.SetTexture(-1, htex, 0/*TRANSLATION(Translation_Remap + curbasepal, globalpal)*/, CLAMP_NOFILTER_XY); // This must be done after setting up the texture. auto& h = lookups.tables[globalpal]; diff --git a/source/glbackend/gl_texture.cpp b/source/glbackend/gl_texture.cpp index cc4b7b7b8..fabdc6e89 100644 --- a/source/glbackend/gl_texture.cpp +++ b/source/glbackend/gl_texture.cpp @@ -61,13 +61,12 @@ OpenGLRenderer::FHardwareTexture* GLInstance::LoadTexture(FTexture *tex, int tex return hwtex; } -bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int method, int sampleroverride) +bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sampler) { TexturePick texpick; if (!PickTexture(picnum, tex, paletteid, texpick)) return false; int TextureType = (texpick.translation & 0x80000000) ? TT_INDEXED : TT_TRUECOLOR; - auto sampler = (method & DAMETH_CLAMPED) ? (sampleroverride != -1 ? sampleroverride : SamplerClampXY) : SamplerRepeat; if (TextureType == TT_INDEXED) { sampler = sampler + SamplerNoFilterRepeat - SamplerRepeat; diff --git a/source/glbackend/glbackend.h b/source/glbackend/glbackend.h index 6cb1448f5..2babbe41a 100644 --- a/source/glbackend/glbackend.h +++ b/source/glbackend/glbackend.h @@ -499,7 +499,7 @@ public: renderState.LookupTexture = tex; } - bool SetTexture(int globalpicnum, FGameTexture* tex, int palette, int method, int sampleroverride); + bool SetTexture(int globalpicnum, FGameTexture* tex, int palette, int sampleroverride); }; extern GLInstance GLInterface; diff --git a/source/glbackend/hw_draw2d.cpp b/source/glbackend/hw_draw2d.cpp index b7a349786..0422ed278 100644 --- a/source/glbackend/hw_draw2d.cpp +++ b/source/glbackend/hw_draw2d.cpp @@ -170,7 +170,7 @@ void GLInstance::Draw2D(F2DDrawer *drawer) SetFadeDisable(true); SetShade(0, numshades); - SetTexture(TileFiles.GetTileIndex(tex), tex, cmd.mTranslationId, 0, cmd.mFlags & F2DDrawer::DTF_Wrap ? CLAMP_NONE : CLAMP_XY); + SetTexture(TileFiles.GetTileIndex(tex), tex, cmd.mTranslationId, cmd.mFlags & F2DDrawer::DTF_Wrap ? CLAMP_NONE : CLAMP_XY); EnableBlend(!(cmd.mRenderStyle.Flags & STYLEF_Alpha1)); UseColorOnly(false); }