From: Matthijs Kooijman Date: Mon, 11 Jun 2007 13:56:32 +0000 (+0200) Subject: * Make Sprite::glEnter2DMode() use this->g instead of some undefined global gr variable. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2FABM2.git;a=commitdiff_plain;h=a905c9a782ae0b618e787461e98dafae87185b80 * Make Sprite::glEnter2DMode() use this->g instead of some undefined global gr variable. --- diff --git a/ABM2/Amaltheia/Sprite.cpp b/ABM2/Amaltheia/Sprite.cpp index a8c10a8..0f9309f 100644 --- a/ABM2/Amaltheia/Sprite.cpp +++ b/ABM2/Amaltheia/Sprite.cpp @@ -22,7 +22,6 @@ #include -Graphics *gr; float z_order = 1.0; @@ -42,14 +41,14 @@ void Sprite::glEnter2DMode() glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glBlendFunc(GL_SRC_ALPHA, GL_ONE); - glViewport(0, 0, gr->getWidth(), gr->getHeight()); + glViewport(0, 0, this->g->getWidth(), this->g->getHeight()); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); - glOrtho(0.0, (GLdouble)gr->getWidth(), (GLdouble)gr->getHeight(), 0.0, 0.0, -2.0); -// gluOrtho2D(0.0, (GLdouble)gr->getWidth(), (GLdouble)gr->getHeight(), 0.0); + glOrtho(0.0, (GLdouble)this->g->getWidth(), (GLdouble)this->g->getHeight(), 0.0, 0.0, -2.0); +// gluOrtho2D(0.0, (GLdouble)this->g->getWidth(), (GLdouble)this->g->getHeight(), 0.0); glMatrixMode(GL_MODELVIEW); glPushMatrix();