From bd22509aa429c6f33075293e379f1e2b2714a094 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 31 Mar 2011 15:08:14 +0200 Subject: Adjust texture coordinates from each node's size. --- quadtree.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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]; -- cgit v1.2.3