mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 20:47:34 +02:00
Merge pull request #8955 from sethalves/fix-obj-textures
fix obj textures
This commit is contained in:
commit
a49669a975
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