From 7a75ef50dcf1955739969b47ff88c6fce9c3843a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Oct 2010 13:44:57 +0000 Subject: modelview widget rotation manipulation --- src/render/camera.cc | 3 --- src/render/gl.cc | 10 ++++++++++ src/render/gl.h | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/render') diff --git a/src/render/camera.cc b/src/render/camera.cc index 329ab36..d13a532 100644 --- a/src/render/camera.cc +++ b/src/render/camera.cc @@ -382,9 +382,6 @@ void Camera::frustum_default(float distance, float cx, float cy) gl::rotate(-90.0f, 1.0f , 0.0f, 0.0f); gl::translate(distance + 1.0f, 0.0f, 0.0f); - - // extra model rotation - gl::rotate(-core::application()->time() / 8.0f *360.0f , 0.0f, 0.0f, 1.0f); } void Camera::ortho() diff --git a/src/render/gl.cc b/src/render/gl.cc index d21065e..f97468f 100644 --- a/src/render/gl.cc +++ b/src/render/gl.cc @@ -159,6 +159,16 @@ void normal(const float x, const float y, const float z) glNormal3f(x, y, z); } +void texcoord(const float x, const float y) +{ + glTexCoord2f(x, y); +} + +void texcoord(const math::Vector2f& vector) +{ + glTexCoord2fv(vector.ptr()); +} + void push() { glPushMatrix(); diff --git a/src/render/gl.h b/src/render/gl.h index 7d1857c..283561e 100644 --- a/src/render/gl.h +++ b/src/render/gl.h @@ -131,6 +131,12 @@ void vertex(const math::Vector2f& vector); void vertex(const float x, const float y); +/// glTexCoord +void texcoord(const float x, const float y); + +/// glTexCoord +void texcoord(const math::Vector2f& vector); + /// glNormal void normal(const math::Vector3f & vector); -- cgit v1.2.3