mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:57:26 +02: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;
|
return v;
|
||||||
}
|
}
|
||||||
glm::vec2 OBJTokenizer::getVec2() {
|
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()) {
|
while (isNextTokenFloat()) {
|
||||||
// there can be a w, but we don't handle that
|
// there can be a w, but we don't handle that
|
||||||
nextToken();
|
nextToken();
|
||||||
|
|
Loading…
Reference in a new issue