mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- 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:
parent
f6ca5fa650
commit
362be65060
4 changed files with 4 additions and 10 deletions
|
@ -67,7 +67,6 @@ static FHardwareTexture *gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t y
|
||||||
auto tex = GLInterface.NewTexture();
|
auto tex = GLInterface.NewTexture();
|
||||||
tex->CreateTexture(xsiz, ysiz, FHardwareTexture::TrueColor, false);
|
tex->CreateTexture(xsiz, ysiz, FHardwareTexture::TrueColor, false);
|
||||||
tex->LoadTexture((uint8_t*)pic2);
|
tex->LoadTexture((uint8_t*)pic2);
|
||||||
tex->SetSampler(SamplerNoFilterClampXY);
|
|
||||||
Xfree(pic2);
|
Xfree(pic2);
|
||||||
|
|
||||||
return tex;
|
return tex;
|
||||||
|
|
|
@ -18,7 +18,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
int mSampler = 0;
|
|
||||||
unsigned int glTexID = 0;
|
unsigned int glTexID = 0;
|
||||||
unsigned int glDepthID = 0; // only used by camera textures
|
unsigned int glDepthID = 0; // only used by camera textures
|
||||||
unsigned int glBufferID = 0;
|
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 LoadTexturePart(const unsigned char* buffer, int x, int y, int w, int h);
|
||||||
unsigned int LoadTexture(FBitmap &bmp);
|
unsigned int LoadTexture(FBitmap &bmp);
|
||||||
unsigned int GetTextureHandle();
|
unsigned int GetTextureHandle();
|
||||||
int GetSampler() { return mSampler; }
|
|
||||||
void SetSampler(int sampler) { mSampler = sampler; }
|
|
||||||
bool isIndexed() const { return internalType == Indexed; }
|
bool isIndexed() const { return internalType == Indexed; }
|
||||||
void BindToFrameBuffer(int w, int h);
|
void BindToFrameBuffer(int w, int h);
|
||||||
|
|
||||||
|
|
|
@ -103,10 +103,9 @@ void PaletteManager::BindPalette(int index)
|
||||||
auto p = GLInterface.NewTexture();
|
auto p = GLInterface.NewTexture();
|
||||||
p->CreateTexture(256, 1, FHardwareTexture::TrueColor, false);
|
p->CreateTexture(256, 1, FHardwareTexture::TrueColor, false);
|
||||||
p->LoadTexture((uint8_t*)palettedata->Palette);
|
p->LoadTexture((uint8_t*)palettedata->Palette);
|
||||||
p->SetSampler(SamplerNoFilterClampXY);
|
|
||||||
palettetextures[index] = p;
|
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[0] = 0;
|
||||||
}
|
}
|
||||||
p->LoadTexture(lookup.Data());
|
p->LoadTexture(lookup.Data());
|
||||||
p->SetSampler(SamplerNoFilterClampXY);
|
|
||||||
palswaptextures[index] = p;
|
palswaptextures[index] = p;
|
||||||
}
|
}
|
||||||
inst->BindTexture(1, palswaptextures[index]);
|
inst->BindTexture(1, palswaptextures[index], SamplerNoFilterClampXY);
|
||||||
inst->SetFadeColor(lookups.getFade(index));
|
inst->SetFadeColor(lookups.getFade(index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -350,7 +350,7 @@ public:
|
||||||
SetColor(r * (1 / 255.f), g * (1 / 255.f), b * (1 / 255.f), a * (1 / 255.f));
|
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 (!tex) return;
|
||||||
if (texunit == 0)
|
if (texunit == 0)
|
||||||
|
@ -359,7 +359,7 @@ public:
|
||||||
else renderState.Flags &= ~RF_UsePalette;
|
else renderState.Flags &= ~RF_UsePalette;
|
||||||
}
|
}
|
||||||
renderState.texIds[texunit] = tex->GetTextureHandle();
|
renderState.texIds[texunit] = tex->GetTextureHandle();
|
||||||
renderState.samplerIds[texunit] = sampler == NoSampler ? tex->GetSampler() : sampler;
|
renderState.samplerIds[texunit] = sampler;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnbindTexture(int texunit)
|
void UnbindTexture(int texunit)
|
||||||
|
|
Loading…
Reference in a new issue