Skip to content

Commit

Permalink
fixes for SG_FILTER_NONE removal
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Sep 2, 2024
1 parent d9c0fa9 commit 2b4a6ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 8 additions & 7 deletions sapp/cgltf-sapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ static void init(void) {
state.placeholders.smp = sg_make_sampler(&(sg_sampler_desc){
.min_filter = SG_FILTER_NEAREST,
.mag_filter = SG_FILTER_NEAREST,
.mipmap_filter = SG_FILTER_NONE,
});
}

Expand Down Expand Up @@ -603,12 +602,14 @@ static sg_filter gltf_to_sg_mag_filter(int gltf_filter) {

static sg_filter gltf_to_sg_mipmap_filter(int gltf_filter) {
switch (gltf_filter) {
case 9728: return SG_FILTER_NONE;
case 9729: return SG_FILTER_NONE;
case 9984: return SG_FILTER_NEAREST;
case 9985: return SG_FILTER_NEAREST;
case 9986: return SG_FILTER_LINEAR;
case 9987: return SG_FILTER_LINEAR;
case 9728:
case 9729:
case 9984:
case 9985:
return SG_FILTER_NEAREST;
case 9986:
case 9987:
return SG_FILTER_LINEAR;
default: return SG_FILTER_LINEAR;
}
}
Expand Down
1 change: 0 additions & 1 deletion sapp/spine-inspector-sapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ static void ui_shutdown(void) {
static const char* ui_sgfilter_name(sg_filter f) {
switch (f) {
case _SG_FILTER_DEFAULT: return "DEFAULT";
case SG_FILTER_NONE: return "NONE";
case SG_FILTER_NEAREST: return "NEAREST";
case SG_FILTER_LINEAR: return "LINEAR";
default: return "???";
Expand Down

0 comments on commit 2b4a6ea

Please sign in to comment.