- 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:
#if 0
#if 1
~DeletingModelArray()
{
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);
}
// 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);
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();