From 78572764acf68b94b9992f488a725bc4be96a5b3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 24 Mar 2008 20:40:57 +0000 Subject: libmath optimizations and cleanups --- src/render/gl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render') diff --git a/src/render/gl.cc b/src/render/gl.cc index 682bfc8..a5f2d99 100644 --- a/src/render/gl.cc +++ b/src/render/gl.cc @@ -121,7 +121,7 @@ void scale(const float x, const float y, const float z) { } void vertex(const Vector3f& vector) { - glVertex3f(vector[0], vector[1], vector[2]); + glVertex3fv(vector.coord); } void vertex(const float x, const float y, const float z) { @@ -148,7 +148,7 @@ void color(const float r, const float g, const float b, const float a) { glColor4f(r,g,b,a); } void color(Color const & color) { - glColor4f(color.red(), color.green(), color.blue(), color.alpha()); + glColor4fv(color.rgba_data); } void matrixmode(GLenum mode) { -- cgit v1.2.3