TINYGL: Changed the way tinyGL textures are disposed.
This commit is contained in:
parent
f0de01af01
commit
2b3fd8501a
3 changed files with 13 additions and 1 deletions
|
@ -54,6 +54,7 @@ GLTexture *alloc_texture(GLContext *c, int h) {
|
|||
*ht = t;
|
||||
|
||||
t->handle = h;
|
||||
t->disposed = false;
|
||||
|
||||
return t;
|
||||
}
|
||||
|
@ -258,7 +259,8 @@ void tglDeleteTextures(int n, const unsigned int *textures) {
|
|||
if (t == c->current_texture) {
|
||||
tglBindTexture(TGL_TEXTURE_2D, 0);
|
||||
}
|
||||
TinyGL::free_texture(c, textures[i]);
|
||||
t->disposed = true;
|
||||
//TinyGL::free_texture(c, textures[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue