summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/glwrapper.cc
diff options
context:
space:
mode:
authorIxtli <cg@325i.org>2010-03-09 13:57:10 +0900
committerEnne Walker <ennewalker@users.sourceforge.net>2010-04-24 10:19:43 -0400
commit38e5cb7bf0c123ed0ae0442684a63442a354e67b (patch)
tree5d7052d5451b7ad1c0db4769f1f625da2b45dcf7 /crawl-ref/source/glwrapper.cc
parentcd3e3d5b0563f32c2ce4007d6c42462351b408a8 (diff)
downloadcrawl-ref-38e5cb7bf0c123ed0ae0442684a63442a354e67b.tar.gz
crawl-ref-38e5cb7bf0c123ed0ae0442684a63442a354e67b.zip
Cleaned up glwrapper
Diffstat (limited to 'crawl-ref/source/glwrapper.cc')
-rw-r--r--crawl-ref/source/glwrapper.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/crawl-ref/source/glwrapper.cc b/crawl-ref/source/glwrapper.cc
index bcd4b560fa..47556b4f7e 100644
--- a/crawl-ref/source/glwrapper.cc
+++ b/crawl-ref/source/glwrapper.cc
@@ -100,16 +100,13 @@ void GLStateManager::set(const GLState& state)
glDisable(GL_ALPHA_TEST);
}
-void GLStateManager::set_transform(GLW_3VF *translate, GLW_3VF *scale)
+void GLStateManager::set_transform(const GLW_3VF *trans, const GLW_3VF *scale)
{
glLoadIdentity();
-
- if (translate)
- glTranslatef(translate->x, translate->y, translate->z);
-
+ if (trans)
+ glTranslatef(trans->x, trans->y, trans->z);
if (scale)
glScalef(scale->x, scale->y, scale->z);
-
}
void GLStateManager::reset_view_for_resize(coord_def &m_windowsz)
@@ -235,12 +232,12 @@ void GLStateManager::reset_view_for_redraw(float x, float y)
void GLStateManager::set_current_color(GLW_3VF &color)
{
- glColor3f(color.x, color.y, color.z);
+ glColor3f(color.r, color.g, color.b);
}
void GLStateManager::set_current_color(GLW_4VF &color)
{
- glColor4f(color.x, color.y, color.z, color.t);
+ glColor4f(color.r, color.g, color.b, color.a);
}
#ifdef DEBUG