- removed FHardwareTexture's mSampler member.

This was a mostly unused relic of early development, the few places using it were static sampler settings.
This commit is contained in:
Christoph Oelckers 2020-05-28 21:45:33 +02:00
parent f6ca5fa650
commit 362be65060
4 changed files with 4 additions and 10 deletions

View file

@ -67,7 +67,6 @@ static FHardwareTexture *gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t y
auto tex = GLInterface.NewTexture();
tex->CreateTexture(xsiz, ysiz, FHardwareTexture::TrueColor, false);
tex->LoadTexture((uint8_t*)pic2);
tex->SetSampler(SamplerNoFilterClampXY);
Xfree(pic2);
return tex;

View file

@ -18,7 +18,6 @@ public:
private:
int mSampler = 0;
unsigned int glTexID = 0;
unsigned int glDepthID = 0; // only used by camera textures
unsigned int glBufferID = 0;
@ -47,8 +46,6 @@ public:
unsigned int LoadTexturePart(const unsigned char* buffer, int x, int y, int w, int h);
unsigned int LoadTexture(FBitmap &bmp);
unsigned int GetTextureHandle();
int GetSampler() { return mSampler; }
void SetSampler(int sampler) { mSampler = sampler; }
bool isIndexed() const { return internalType == Indexed; }
void BindToFrameBuffer(int w, int h);

View file

@ -103,10 +103,9 @@ void PaletteManager::BindPalette(int index)
auto p = GLInterface.NewTexture();
p->CreateTexture(256, 1, FHardwareTexture::TrueColor, false);
p->LoadTexture((uint8_t*)palettedata->Palette);
p->SetSampler(SamplerNoFilterClampXY);
palettetextures[index] = p;
}
inst->BindTexture(2, palettetextures[index]);
inst->BindTexture(2, palettetextures[index], SamplerNoFilterClampXY);
}
}
@ -141,10 +140,9 @@ void PaletteManager::BindPalswap(int index)
p[0] = 0;
}
p->LoadTexture(lookup.Data());
p->SetSampler(SamplerNoFilterClampXY);
palswaptextures[index] = p;
}
inst->BindTexture(1, palswaptextures[index]);
inst->BindTexture(1, palswaptextures[index], SamplerNoFilterClampXY);
inst->SetFadeColor(lookups.getFade(index));
}
}

View file

@ -350,7 +350,7 @@ public:
SetColor(r * (1 / 255.f), g * (1 / 255.f), b * (1 / 255.f), a * (1 / 255.f));
}
void BindTexture(int texunit, FHardwareTexture* tex, int sampler = NoSampler)
void BindTexture(int texunit, FHardwareTexture* tex, int sampler)
{
if (!tex) return;
if (texunit == 0)
@ -359,7 +359,7 @@ public:
else renderState.Flags &= ~RF_UsePalette;
}
renderState.texIds[texunit] = tex->GetTextureHandle();
renderState.samplerIds[texunit] = sampler == NoSampler ? tex->GetSampler() : sampler;
renderState.samplerIds[texunit] = sampler;
}
void UnbindTexture(int texunit)