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

Method draw

blocks/Box2D/templates/Basic Box2D/src/_TBOX_PREFIX_App.cpp:78–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void _TBOX_PREFIX_App::draw()
79{
80 gl::clear();
81
82 gl::color( 1, 0.5f, 0.25f );
83 for( const auto &box : mBoxes ) {
84 gl::pushModelMatrix();
85 gl::translate( box->GetPosition().x, box->GetPosition().y );
86 gl::rotate( box->GetAngle() );
87
88 gl::drawSolidRect( Rectf( -BOX_SIZE, -BOX_SIZE, BOX_SIZE, BOX_SIZE ) );
89
90 gl::popModelMatrix();
91 }
92}
93
94CINDER_APP( _TBOX_PREFIX_App, RendererGl )

Callers

nothing calls this directly

Calls 8

pushModelMatrixFunction · 0.85
drawSolidRectFunction · 0.85
popModelMatrixFunction · 0.85
clearFunction · 0.50
colorFunction · 0.50
translateFunction · 0.50
rotateFunction · 0.50
GetAngleMethod · 0.45

Tested by

no test coverage detected