diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-03-31 15:08:14 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-03-31 15:08:14 +0200 |
commit | bd22509aa429c6f33075293e379f1e2b2714a094 (patch) | |
tree | 4b306401e8908a3e419835008dca6c3460c017b8 | |
parent | f658c122374c09682d9029f0d0d76d1bfd67404b (diff) |
Adjust texture coordinates from each node's size.
-rw-r--r-- | quadtree.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/quadtree.cpp b/quadtree.cpp index 33011d5..fc6b3cc 100644 --- a/quadtree.cpp +++ b/quadtree.cpp @@ -260,6 +260,11 @@ void Quadtree::make_vbo() { {{.5, .5}, {1, 0}, {0, 0}} }; for(int i = 0; i < 4; i++) { + for(int j = 0; j < 3; j++) { + tex_coords[i][j][0] *= n->width; + tex_coords[i][j][1] *= n->height; + } + v[3] = n->vertex_array[i*3+3]; v[4] = n->vertex_array[i*3+4]; v[5] = n->vertex_array[i*3+5]; |