示例#1
0
	void GameEngine::drawFrame(){
	    if (engine->display == NULL) {
	        // No display.
	        return;
	    }
	    //float temp = 0.3f;
	    float temp = static_cast<float>(engine->state.x);
	    temp = (temp / engine->width) - 0.5;
	    openglDraw(temp);

	    eglSwapBuffers(engine->display, engine->surface);
	}
示例#2
0
void VideoWidget::paintEvent( QPaintEvent *event )
{
	makeCurrent();

	openglDraw();
	
	QPainter painter( this );
	painter.setRenderHint( QPainter::Antialiasing );
	
	if ( !playing && lastFrame && lastFrame->sample ) {
		drawOVD( &painter, qAbs( lastFrame->glSAR - 1.0 ) > 1e-3 );
	}
	
	osdMessage.draw( &painter, width(), height() );
	osdTimer.draw( &painter, width(), height() );
}