From 029f4476fc81d8d854461885d57c384956f6f183 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 2 Jun 2014 12:18:18 +0000 Subject: [PATCH] cleanup --- contrib/mobile/drawContext.cpp | 14 +++++--------- contrib/mobile/drawContext.h | 5 +---- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/contrib/mobile/drawContext.cpp b/contrib/mobile/drawContext.cpp index a97342d56d..abccbd2ad7 100644 --- a/contrib/mobile/drawContext.cpp +++ b/contrib/mobile/drawContext.cpp @@ -62,10 +62,7 @@ drawContext::drawContext(float fontFactor, bool retina) _translate[i] = 0.; _scale[i] = 1.; } - setQuaternion(0., 0., 0., 1.); - - _fillMesh = false; - _gradiant = true; + setQuaternion(0., 0., 0., 1.); _fontFactor = fontFactor; _retina = retina; } @@ -598,7 +595,7 @@ void drawContext::drawView() glMatrixMode(GL_MODELVIEW); // fill the background glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - if(_gradiant){ + if(CTX::instance()->bgGradient){ glPushMatrix(); glLoadIdentity(); const GLfloat squareVertices[] = { @@ -628,7 +625,7 @@ void drawContext::drawView() glScalef(_scale[0], _scale[1], _scale[2]); glTranslatef(_translate[0], _translate[1], _translate[2]); - if(CTX::instance()->rotationCenterCg) + if(CTX::instance()->rotationCenterCg) glTranslatef(CTX::instance()->cg[0], CTX::instance()->cg[1], CTX::instance()->cg[2]); @@ -637,7 +634,7 @@ void drawContext::drawView() CTX::instance()->rotationCenter[1], CTX::instance()->rotationCenter[2]); - buildRotationMatrix(); + buildRotationMatrix(); glMultMatrixf(_rotatef); if(CTX::instance()->rotationCenterCg) @@ -649,7 +646,7 @@ void drawContext::drawView() -CTX::instance()->rotationCenter[1], -CTX::instance()->rotationCenter[2]); - checkGlError("Initialize position"); + checkGlError("Initialize position"); glEnable(GL_DEPTH_TEST); drawMesh(); @@ -760,7 +757,6 @@ int onelab_cb(std::string action) } while(action == "compute" && !onelabStop && (onelabUtils::incrementLoop("3") || onelabUtils::incrementLoop("2") || onelabUtils::incrementLoop("1"))); - locked = false; return redraw; } diff --git a/contrib/mobile/drawContext.h b/contrib/mobile/drawContext.h index 3929eff03b..87220f6e04 100644 --- a/contrib/mobile/drawContext.h +++ b/contrib/mobile/drawContext.h @@ -37,10 +37,8 @@ private: int _width, _height; // size of OpenGL context in pixel float _left, _right, _top, _bottom, _far; // value of "border" float _fontFactor; - bool _gradiant; // show the background gradiant - bool _fillMesh; // fill the Mesh bool _retina; // retina display - + void OrthofFromGModel(void); void drawPView(PView *p); void drawVectorArray(PViewOptions *opt, VertexArray *va); @@ -63,7 +61,6 @@ public: void drawMesh(); void drawPost(); void drawScale(); - void useGradiant(bool gradiant=true) {_gradiant = gradiant;} }; #endif -- GitLab