void FeatureDemo::onFrameRender() { beginTestFrame(); if (mpSceneRenderer) { beginFrame(); { PROFILE(updateScene); mpSceneRenderer->update(mCurrentTime); } depthPass(); shadowPass(); mpState->setFbo(mpMainFbo); renderSkyBox(); lightingPass(); antiAliasing(); postProcess(); ambientOcclusion(); endFrame(); } else { mpRenderContext->clearFbo(mpDefaultFBO.get(), vec4(0.2f, 0.4f, 0.5f, 1), 1, 0); } endTestFrame(); }
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> void Graph::draw(QPainter &p) { QPolygonF poly; unproject(poly); p.setRenderHint(QPainter::Antialiasing, antiAliasing()); if ( dropShadow() ) { p.translate(2,2); p.setPen(QPen(QColor(128,128,128,128), lineWidth())); p.drawPolyline(poly); p.translate(-2,-2); } p.setPen(pen()); p.drawPolyline(poly); }
void Viewer::draw_aux(bool with_names) { QGLViewer::draw(); if(scene == 0) return; ::glLineWidth(1.0f); ::glPointSize(2.f); ::glEnable(GL_POLYGON_OFFSET_FILL); ::glPolygonOffset(1.0f,1.0f); ::glClearColor(1.0f,1.0f,1.0f,0.0f); ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); if(twosides) ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); else ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); if(antiAliasing()) { ::glEnable(GL_BLEND); ::glEnable(GL_LINE_SMOOTH); ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } else { ::glDisable(GL_BLEND); ::glDisable(GL_LINE_SMOOTH); ::glDisable(GL_POLYGON_SMOOTH_HINT); ::glBlendFunc(GL_ONE, GL_ZERO); ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST); } if(with_names) scene->drawWithNames(); else scene->draw(); }