Gpu cleanup

This commit is contained in:
luboslenco
2025-07-10 16:35:19 +02:00
parent 9515dc81ad
commit ebdd602741
19 changed files with 90 additions and 354 deletions
-23
View File
@@ -81,29 +81,6 @@ function material_context_create(raw: material_context_t): material_context_t {
let image: gpu_texture_t = data_get_image(tex.file);
array_push(raw._.textures, image);
// Set mipmaps
if (tex.mipmaps != null) {
let mipmaps: gpu_texture_t[] = [];
while (mipmaps.length < tex.mipmaps.length) {
array_push(mipmaps, null);
}
for (let j: i32 = 0; j < tex.mipmaps.length; ++j) {
let name: string = tex.mipmaps[j];
let mipimg: gpu_texture_t = data_get_image(name);
mipmaps[j] = mipimg;
}
gpu_set_mipmaps(image, mipmaps);
tex.mipmaps = null;
tex.generate_mipmaps = false;
}
else if (tex.generate_mipmaps == true && image != null) {
// gpu_texture_generate_mipmaps(image, 1000);
tex.mipmaps = null;
tex.generate_mipmaps = false;
}
}
}