Skip to content

Commit 5a1e382

Browse files
committed
gltfpack: Use cgltf_filter_type/cgltf_wrap_mode enums
Instead of comparing to numeric values, compare to the enums that are now exposed by cgltf.
1 parent fd4b3ad commit 5a1e382

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gltf/write.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,25 +841,25 @@ static std::string decodeUri(const char* uri)
841841

842842
void writeSampler(std::string& json, const cgltf_sampler& sampler)
843843
{
844-
if (sampler.mag_filter != 0)
844+
if (sampler.mag_filter != cgltf_filter_type_undefined)
845845
{
846846
comma(json);
847847
append(json, "\"magFilter\":");
848848
append(json, size_t(sampler.mag_filter));
849849
}
850-
if (sampler.min_filter != 0)
850+
if (sampler.min_filter != cgltf_filter_type_undefined)
851851
{
852852
comma(json);
853853
append(json, "\"minFilter\":");
854854
append(json, size_t(sampler.min_filter));
855855
}
856-
if (sampler.wrap_s != 10497)
856+
if (sampler.wrap_s != cgltf_wrap_mode_repeat)
857857
{
858858
comma(json);
859859
append(json, "\"wrapS\":");
860860
append(json, size_t(sampler.wrap_s));
861861
}
862-
if (sampler.wrap_t != 10497)
862+
if (sampler.wrap_t != cgltf_wrap_mode_repeat)
863863
{
864864
comma(json);
865865
append(json, "\"wrapT\":");

0 commit comments

Comments
 (0)