Skip to content

Commit

Permalink
Added magic to adjust for internal reference within an object.
Browse files Browse the repository at this point in the history
This needs to be moved out to a configuration file.

Signed-off-by: Alastair Lynn <arplynn@gmail.com>
  • Loading branch information
prophile committed Jun 29, 2010
1 parent 1f4c3ef commit 6987a30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Engine/Graphics/Object3D.cpp
Expand Up @@ -350,6 +350,7 @@ void Object3D::LoadTexture(const std::string& name)
}

Object3D::Object3D ( const std::string& name )
: offX(-0.5f), offY(-0.5f), intScale(1.0f)
{
// load the texture
LoadTexture(name);
Expand Down Expand Up @@ -383,6 +384,8 @@ void Object3D::Draw ( float scale, float angle, float bank )
glPushMatrix();
glEnableClientState(GL_NORMAL_ARRAY);
glRotatef(bank, 1.0f, 1.0f, 1.0f);
glScalef(intScale, intScale, intScale);
glTranslatef(offX, offY, 0.0f);
//glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
// bind the VBOs
glBindBuffer(GL_ARRAY_BUFFER, vertexVBO);
Expand Down
1 change: 1 addition & 0 deletions Engine/Graphics/Object3D.h
Expand Up @@ -25,6 +25,7 @@ class Object3D
GLuint texVBO;
GLuint tangentVBO;
GLuint texture;
float offX, offY, intScale;
unsigned int nverts;
void LoadObject(const std::string& name);
void LoadTexture(const std::string& name);
Expand Down

0 comments on commit 6987a30

Please sign in to comment.