MCPcopy Create free account
hub / github.com/cinder/Cinder / drawInfo

Method drawInfo

test/AppTest/src/AppTestApp.cpp:281–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281void 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 )

Callers

nothing calls this directly

Calls 15

grayFunction · 0.85
formatEnum · 0.85
getAverageFpsFunction · 0.85
stringFunction · 0.85
isVerticalSyncEnabledFunction · 0.85
getWindowHeightFunction · 0.85
whiteFunction · 0.85
addLineMethod · 0.80
FontFunction · 0.50
createFunction · 0.50
colorFunction · 0.50
drawFunction · 0.50

Tested by

no test coverage detected