TINYGL: Added texture data versioning.
This is introduced to detect changes when a texture is updated.
This commit is contained in:
parent
03239abf72
commit
94a41de865
2 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,7 @@ GLTexture *alloc_texture(GLContext *c, int h) {
|
|||
|
||||
t->handle = h;
|
||||
t->disposed = false;
|
||||
t->versionNumber = 0;
|
||||
|
||||
return t;
|
||||
}
|
||||
|
@ -165,6 +166,7 @@ void glopTexImage2D(GLContext *c, GLParam *p) {
|
|||
}
|
||||
}
|
||||
|
||||
c->current_texture->versionNumber++;
|
||||
im = &c->current_texture->images[level];
|
||||
im->xsize = width;
|
||||
im->ysize = height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue