From 1b15c9928b5960c515b68fea3eafe7580902642b Mon Sep 17 00:00:00 2001 From: Taylor <2374670+taylormck@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:28:19 +0900 Subject: add cgltf filter type and wrap mode enums --- vendor/cgltf/cgltf.odin | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/vendor/cgltf/cgltf.odin b/vendor/cgltf/cgltf.odin index e9dc7ef84..92b498d37 100644 --- a/vendor/cgltf/cgltf.odin +++ b/vendor/cgltf/cgltf.odin @@ -262,12 +262,28 @@ image :: struct { extensions: [^]extension `fmt:"v,extensions_count"`, } +filter_type :: enum c.int { + undefined = 0, + nearest = 9728, + linear = 9729, + nearest_mipmap_nearest = 9984, + linear_mipmap_nearest = 9985, + nearest_mipmap_linear = 9986, + linear_mipmap_linear = 9987, +} + +wrap_mode :: enum c.int { + clamp_to_edge = 33071, + mirrored_repeat = 33648, + repeat = 10497, +} + sampler :: struct { name: cstring, - mag_filter: c.int, - min_filter: c.int, - wrap_s: c.int, - wrap_t: c.int, + mag_filter: filter_type, + min_filter: filter_type, + wrap_s: wrap_mode, + wrap_t: wrap_mode, extras: extras_t, extensions_count: uint, extensions: [^]extension `fmt:"v,extensions_count"`, -- cgit v1.2.3 From 6c2b72f70128e63dea0b009f298e0b34bd9fd865 Mon Sep 17 00:00:00 2001 From: Taylor <2374670+taylormck@users.noreply.github.com> Date: Wed, 30 Jul 2025 00:17:40 +0900 Subject: fix: align the enum values --- vendor/cgltf/cgltf.odin | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vendor/cgltf/cgltf.odin b/vendor/cgltf/cgltf.odin index 92b498d37..bab58d851 100644 --- a/vendor/cgltf/cgltf.odin +++ b/vendor/cgltf/cgltf.odin @@ -263,19 +263,19 @@ image :: struct { } filter_type :: enum c.int { - undefined = 0, - nearest = 9728, - linear = 9729, + undefined = 0, + nearest = 9728, + linear = 9729, nearest_mipmap_nearest = 9984, - linear_mipmap_nearest = 9985, - nearest_mipmap_linear = 9986, - linear_mipmap_linear = 9987, + linear_mipmap_nearest = 9985, + nearest_mipmap_linear = 9986, + linear_mipmap_linear = 9987, } wrap_mode :: enum c.int { - clamp_to_edge = 33071, + clamp_to_edge = 33071, mirrored_repeat = 33648, - repeat = 10497, + repeat = 10497, } sampler :: struct { -- cgit v1.2.3