- fixed: Warped textures were recreated each time they were bound.

- fixed: Models were never freed.
This commit is contained in:
Christoph Oelckers 2013-10-03 12:12:19 +02:00
parent a338248e3e
commit a72b94e80c
2 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ class DeletingModelArray : public TArray<FModel *>
{ {
public: public:
#if 0 #if 1
~DeletingModelArray() ~DeletingModelArray()
{ {
for(unsigned i=0;i<Size();i++) for(unsigned i=0;i<Size();i++)

View File

@ -420,8 +420,8 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int cm, int clampmode, int
hwtex = CreateTexture(clampmode); hwtex = CreateTexture(clampmode);
} }
// Texture has become invalid // 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->CheckModified()) else if ((warp == 0 && !tex->bHasCanvas && !tex->bWarped) && tex->CheckModified())
{ {
Clean(true); Clean(true);
hwtex = CreateTexture(clampmode); hwtex = CreateTexture(clampmode);
@ -480,8 +480,8 @@ const FHardwareTexture * FGLTexture::BindPatch(int texunit, int cm, int translat
CreatePatch(); CreatePatch();
} }
// Texture has become invalid // 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->CheckModified()) else if ((warp == 0 && !tex->bHasCanvas && !tex->bWarped) && tex->CheckModified())
{ {
Clean(true); Clean(true);
CreatePatch(); CreatePatch();