diff options
author | rodri <rgl@antares-labs.eu> | 2024-09-26 11:32:44 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-09-26 11:32:44 +0000 |
commit | 78739a666a7031db16648c7d629f567442ea16bd (patch) | |
tree | a8bf6b462421b71aab64f3a88e7b64f0f7599141 /obj.c | |
parent | 4742c552904c44bc77604b7cf03ed7b14e2e7ef4 (diff) | |
download | libobj-78739a666a7031db16648c7d629f567442ea16bd.tar.gz libobj-78739a666a7031db16648c7d629f567442ea16bd.tar.bz2 libobj-78739a666a7031db16648c7d629f567442ea16bd.zip |
add an opacity parameter in OBJColor to discard non-colors.
Diffstat (limited to 'obj.c')
-rw-r--r-- | obj.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -425,6 +425,7 @@ objmtlparse(char *file) m->Ka.g = strtod(f[2], nil); m->Ka.b = strtod(f[3], nil); } + m->Ka.a = 1; }else if(strcmp(f[0], "Kd") == 0){ if(nf != 2 && nf != 4){ mterror("syntax error"); @@ -441,6 +442,7 @@ objmtlparse(char *file) m->Kd.g = strtod(f[2], nil); m->Kd.b = strtod(f[3], nil); } + m->Kd.a = 1; }else if(strcmp(f[0], "Ks") == 0){ if(nf != 2 && nf != 4){ mterror("syntax error"); @@ -457,6 +459,7 @@ objmtlparse(char *file) m->Ks.g = strtod(f[2], nil); m->Ks.b = strtod(f[3], nil); } + m->Ks.a = 1; }else if(strcmp(f[0], "Ke") == 0){ if(nf != 2 && nf != 4){ mterror("syntax error"); @@ -473,6 +476,7 @@ objmtlparse(char *file) m->Ke.g = strtod(f[2], nil); m->Ke.b = strtod(f[3], nil); } + m->Ke.a = 1; }else if(strcmp(f[0], "Ns") == 0){ if(nf != 2){ mterror("syntax error"); |