mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- removed the texture ID cache.
Although this initially helped, it was only because it partially covered up the issues from the real problem which was using the sampler properties of the texture offsets. With that one fixed this cache became pointless.
This commit is contained in:
parent
bc986b8054
commit
4a9f0248d7
2 changed files with 7 additions and 9 deletions
|
@ -124,6 +124,10 @@ FHardwareTexture* GLInstance::LoadTexture(FTexture* tex, int textype, int palid)
|
||||||
|
|
||||||
bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int method, int sampleroverride, float xpanning, float ypanning, FTexture *det, float detscale, FTexture *glow)
|
bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int method, int sampleroverride, float xpanning, float ypanning, FTexture *det, float detscale, FTexture *glow)
|
||||||
{
|
{
|
||||||
|
if (picnum == 3692)
|
||||||
|
{
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0) return false;
|
if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0) return false;
|
||||||
int usepalette = fixpalette >= 1 ? fixpalette - 1 : curbasepal;
|
int usepalette = fixpalette >= 1 ? fixpalette - 1 : curbasepal;
|
||||||
int usepalswap = fixpalswap >= 1 ? fixpalswap - 1 : palette;
|
int usepalswap = fixpalswap >= 1 ? fixpalswap - 1 : palette;
|
||||||
|
|
|
@ -245,15 +245,9 @@ void GLInstance::Draw(EDrawType type, size_t start, size_t count)
|
||||||
|
|
||||||
int GLInstance::GetTextureID()
|
int GLInstance::GetTextureID()
|
||||||
{
|
{
|
||||||
// Generating large numbers of texture IDs piece by piece does not work well on modern NVidia drivers.
|
uint32_t id = 0;
|
||||||
|
glGenTextures(1, &id);
|
||||||
if (currentindex == THCACHESIZE)
|
return id;
|
||||||
{
|
|
||||||
currentindex = 0;
|
|
||||||
glGenTextures(THCACHESIZE, TextureHandleCache);
|
|
||||||
}
|
|
||||||
else currentindex++;
|
|
||||||
return TextureHandleCache[currentindex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FHardwareTexture* GLInstance::NewTexture()
|
FHardwareTexture* GLInstance::NewTexture()
|
||||||
|
|
Loading…
Reference in a new issue