From 0cc57c614103a93862400c667ae6ee16a0f0d1bb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 May 2016 20:50:01 +0200 Subject: [PATCH 1/2] - fixed: BoundTextureDraw2D must reset the texture mode. --- src/posix/cocoa/i_video.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 069239b48..2c04c53a6 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -1285,6 +1285,7 @@ void BoundTextureDraw2D(const GLsizei width, const GLsizei height) vbo->RenderCurrent(ptr, GL_TRIANGLE_STRIP); gl_RenderState.SetEffect(EFF_NONE); + gl_RenderState.SetTextureMode(TM_MODULATE); } bool BoundTextureSaveAsPNG(const GLenum target, const char* const path) From 15933f9c728758363a1b023a541c77795a0714c3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 May 2016 20:51:23 +0200 Subject: [PATCH 2/2] - fixed: Texture precaching for sprites had some inverted logic and deleted everything that was still required. --- src/gl/textures/gl_hwtexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/textures/gl_hwtexture.cpp b/src/gl/textures/gl_hwtexture.cpp index b964b030e..7d9d754fd 100644 --- a/src/gl/textures/gl_hwtexture.cpp +++ b/src/gl/textures/gl_hwtexture.cpp @@ -315,13 +315,13 @@ void FHardwareTexture::Clean(bool all) void FHardwareTexture::CleanUnused(SpriteHits &usedtranslations) { - if (usedtranslations.CheckKey(0) != nullptr) + if (usedtranslations.CheckKey(0) == nullptr) { glDefTex.Delete(); } for (int i = glTex_Translated.Size()-1; i>= 0; i--) { - if (usedtranslations.CheckKey(glTex_Translated[i].translation) != nullptr) + if (usedtranslations.CheckKey(glTex_Translated[i].translation) == nullptr) { glTex_Translated[i].Delete(); glTex_Translated.Delete(i);