graphics

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 7ed3285c581298fd1230a091c983efb8f6c64d8b
parent 0ee075a0a33f3574c1fc1f455101db891ca10c9b
Author: Brian Swetland <swetland@frotz.net>
Date:   Thu, 31 Jan 2013 21:19:05 -0800

loadobj: deal with DX vs GL texture coords

Diffstat:
Mcommon/loadobj.cc | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/common/loadobj.cc b/common/loadobj.cc @@ -70,6 +70,10 @@ struct obj *load_obj(const char *fn) { } else if (!strncmp(buf, "vt ", 3)) { v2 t; sscanf(buf + 3, "%f %f", &t.u, &t.v); + + /* TODO: make parameter -- inverting V for DX... */ + t.v = 1.0 - t.v; + o->texcoords.push_back(t); } else if (!strncmp(buf, "f ", 2)) { i3 t;