void displayHandler() { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); drawAxes(); drawSpiral(); drawTangents(); glPushMatrix(); glTranslated(moveV.x, moveV.y, moveV.z); glRotated(angleDeg, os.x, os.y, os.z); r.render(); glPopMatrix(); glutSwapBuffers(); }
void operator () (GEdge *e) { if(!e->getVisibility()) { if(e->getCompound()) { if(!e->getCompound()->getVisibility()) return; } else return; } bool select = (_ctx->render_mode == drawContext::GMSH_SELECT && e->model() == GModel::current()); if(select) { glPushName(1); glPushName(e->tag()); } if(CTX::instance()->mesh.lines) drawArrays(_ctx, e, e->va_lines, GL_LINES, false); if(CTX::instance()->mesh.linesNum) drawElementLabels(_ctx, e, e->lines); if(CTX::instance()->mesh.points || CTX::instance()->mesh.pointsNum){ if(e->getAllElementsVisible()) drawVerticesPerEntity(_ctx, e); else drawVerticesPerElement(_ctx, e, e->lines); } if(CTX::instance()->mesh.tangents) drawTangents(_ctx, e->lines); if(select) { glPopName(); glPopName(); } }