Browse Source

Properly remove texture from handle map

Karl Zylinski 6 months ago
parent
commit
5ea829c83c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      karl2d_windows.odin

+ 2 - 0
karl2d_windows.odin

@@ -455,6 +455,8 @@ _destroy_texture :: proc(tex: Texture) {
 		t.tex->Release()
 		t.view->Release()	
 	}
+
+	hm.remove(&s.textures, tex.id)
 }
 
 _draw_texture :: proc(tex: Texture, pos: Vec2, tint := WHITE) {