Remove duplicate code

This commit is contained in:
2026-10-13 11:57:43 -03:00
parent dfc6a6d77b
commit 5165698fe3
50 changed files with 307 additions and 812 deletions
+8
View File
@@ -567,6 +567,14 @@ export function set_current_texture(texture: GPUTexture) {
current_texture = texture;
}
// draws with texture from now on, flushing what was batched with another one first
export function use_texture(texture: GPUTexture) {
if (current_texture !== texture) {
flush_batch();
current_texture = texture;
}
}
export function create_texture(width: number, height: number): GPUTexture {
return device.createTexture({
size: [width, height],