mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
in C, order of argument evaluation isn't defined
This commit is contained in:
parent
d2b83b47ba
commit
43536e0046
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ glm::vec3 OBJTokenizer::getVec3() {
|
|||
return v;
|
||||
}
|
||||
glm::vec2 OBJTokenizer::getVec2() {
|
||||
auto v = glm::vec2(getFloat(), 1.0f - getFloat()); // OBJ has an odd sense of u, v. Also N.B.: getFloat() has side-effect
|
||||
float uCoord = getFloat();
|
||||
float vCoord = 1.0f - getFloat();
|
||||
auto v = glm::vec2(uCoord, vCoord);
|
||||
while (isNextTokenFloat()) {
|
||||
// there can be a w, but we don't handle that
|
||||
nextToken();
|
||||
|
|
Loading…
Reference in a new issue