+static void delTextures()
+{
+ imgopengl_t*i = img2texid;
+ while(i) {
+ imgopengl_t*next = i->next;
+ if(i->data) {
+ glDeleteTextures(1, &i->texID);
+ free(i->data);
+ }
+ memset(i, 0, sizeof(imgopengl_t));
+ free(i);
+ i = next;
+ }
+}
+
+static imgopengl_t*addTexture(gfximage_t*img)