mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-01 09:42:27 +00:00
- simplified the texture sampler setup.
DAMETH_CLAMPED was redundant and only causig problems.
This commit is contained in:
parent
1b12c08c66
commit
7638ead1c8
6 changed files with 8 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue