render: Change texture origin to top-left.
authorDavid Thompson <dthompson2@worcester.edu>
Mon, 10 Sep 2018 21:42:10 +0000 (17:42 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Mon, 10 Sep 2018 21:49:49 +0000 (17:49 -0400)
commitcbf59a78d1a85cfc92644615a56a18cf6b054604
tree73861b0a41e77db6bfdc3daea0f20a95d2635a3e
parent3de33f94c593a5b740dbb4096631b0b2971e2101
render: Change texture origin to top-left.

This is a pretty big change, but hopefully for the best as this aligns
with graphics programs and the glTF standard that uses a top-left
origin.  We can keep using a lower-left origin for vertices, though.

* chickadee/render/texture.scm (surface->texture): Stop flipping pixel
rows.
* chickadee/render/sprites.scm (draw-sprite-unbatched,
sprite-batch-add!, draw-nine-patch*): Adjust texture y-coordinates.
* chickadee/render/font.scm (parse-fnt): Stop inverting y coordinates.
* chickadee/render/tiled.scm (load-tile-map): Stop inverting tile ids.
chickadee/render/font.scm
chickadee/render/sprite.scm
chickadee/render/texture.scm
chickadee/render/tiled.scm