| 279 | } |
| 280 | |
| 281 | void AppTestApp::drawInfo() |
| 282 | { |
| 283 | TextLayout layout; |
| 284 | layout.setFont( Font( "Arial", 16 ) ); |
| 285 | layout.setColor( ColorA::gray( 0.9f, 0.75f ) ); |
| 286 | |
| 287 | auto fps = boost::format( "%0.2f" ) % getAverageFps(); |
| 288 | layout.addLine( "fps: " + fps.str() ); |
| 289 | layout.addLine( "v-sync enabled: " + string( gl::isVerticalSyncEnabled() ? "true" : "false" ) ); |
| 290 | |
| 291 | auto tex = gl::Texture::create( layout.render( true ) ); |
| 292 | |
| 293 | vec2 offset( 6, getWindowHeight() - tex->getHeight() - 6 ); // bottom left |
| 294 | |
| 295 | gl::color( Color::white() ); |
| 296 | gl::draw( tex, offset ); |
| 297 | } |
| 298 | |
| 299 | // no settings fn: |
| 300 | //CINDER_APP( AppTestApp, RendererGl ) |
nothing calls this directly
no test coverage detected