diff --git a/source/build/src/texcache.cpp b/source/build/src/texcache.cpp index f4822d373..f7f527f61 100644 --- a/source/build/src/texcache.cpp +++ b/source/build/src/texcache.cpp @@ -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) { + if (picnum == 3692) + { + int a = 0; + } if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0) return false; int usepalette = fixpalette >= 1 ? fixpalette - 1 : curbasepal; int usepalswap = fixpalswap >= 1 ? fixpalswap - 1 : palette; diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index efc2ac10e..333e926f4 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -245,15 +245,9 @@ void GLInstance::Draw(EDrawType type, size_t start, size_t count) int GLInstance::GetTextureID() { - // Generating large numbers of texture IDs piece by piece does not work well on modern NVidia drivers. - - if (currentindex == THCACHESIZE) - { - currentindex = 0; - glGenTextures(THCACHESIZE, TextureHandleCache); - } - else currentindex++; - return TextureHandleCache[currentindex]; + uint32_t id = 0; + glGenTextures(1, &id); + return id; } FHardwareTexture* GLInstance::NewTexture()