From d27a975710cf7ef02f755ef768f133e19df69fa5 Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Wed, 18 May 2016 08:15:13 -0400 Subject: Z INDEXING --- src/common.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index 060da00..c643174 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -47,15 +47,15 @@ void useShader(GLuint *sh, GLint *tu, GLint *ca, GLint *ta) tex_attrib = ta; } -void drawRect(vec2 ll, vec2 ur) +void drawRect(vec2 ll, vec2 ur, float z) { - GLfloat verts[] = {ll.x, ll.y, 1.0, - ur.x, ll.y, 1.0, - ur.x, ur.y, 1.0, + GLfloat verts[] = {ll.x, ll.y, z, + ur.x, ll.y, z, + ur.x, ur.y, z, - ur.x, ur.y, 1.0, - ll.x, ur.y, 1.0, - ll.x, ll.y, 1.0}; + ur.x, ur.y, z, + ll.x, ur.y, z, + ll.x, ll.y, z}; GLfloat tex[] = {0.0, 1.0, 1.0, 1.0, -- cgit v1.2.3