From a72b94e80caf80da3049fbf8a388159f5b8d9f70 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 3 Oct 2013 12:12:19 +0200 Subject: [PATCH] - fixed: Warped textures were recreated each time they were bound. - fixed: Models were never freed. --- src/gl/models/gl_models.cpp | 2 +- src/gl/textures/gl_material.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index a59666d04..39668cd02 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -78,7 +78,7 @@ class DeletingModelArray : public TArray { public: -#if 0 +#if 1 ~DeletingModelArray() { for(unsigned i=0;ibHasCanvas) && tex->CheckModified()) + // Texture has become invalid - this is only for special textures, not the regular warping, which is handled above + else if ((warp == 0 && !tex->bHasCanvas && !tex->bWarped) && tex->CheckModified()) { Clean(true); hwtex = CreateTexture(clampmode); @@ -480,8 +480,8 @@ const FHardwareTexture * FGLTexture::BindPatch(int texunit, int cm, int translat CreatePatch(); } - // Texture has become invalid - else if ((warp == 0 && !tex->bHasCanvas) && tex->CheckModified()) + // Texture has become invalid - this is only for special textures, not the regular warping, which is handled above + else if ((warp == 0 && !tex->bHasCanvas && !tex->bWarped) && tex->CheckModified()) { Clean(true); CreatePatch();