| 214 | } |
| 215 | |
| 216 | void FallingGearsApp::drawInfo() |
| 217 | { |
| 218 | gl::ScopedBlendAlpha blendScope; |
| 219 | |
| 220 | TextLayout layout; |
| 221 | layout.setFont( Font( "Arial", 14 ) ); |
| 222 | layout.setColor( Color( 1, 1, 0 ) ); |
| 223 | |
| 224 | layout.addLine( string( "gears: " + to_string( mScene.getGears().size() ) ) ); |
| 225 | layout.addLine( string( "synths: " + to_string( mAudio.getNumUsedSynths() ) + " / " + to_string( mAudio.getNumTotalSynths() ) ) ); |
| 226 | |
| 227 | auto tex = gl::Texture::create( layout.render( true ) ); |
| 228 | |
| 229 | vec2 offset( getWindowWidth() - tex->getWidth() - 16, 10 ); |
| 230 | gl::color( Color::white() ); |
| 231 | gl::draw( tex, offset ); |
| 232 | |
| 233 | } |
| 234 | |
| 235 | CINDER_APP( FallingGearsApp, RendererGl( RendererGl::Options().msaa( 8 ) ), []( App::Settings *settings ) { |
| 236 | settings->setWindowSize( 1200, 800 ); |
nothing calls this directly
no test coverage detected