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

Method draw

samples/Tubular/src/TubularApp.cpp:214–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void TubularApp::draw()
215{
216 gl::clear( Color( 0, 0, 0 ) );
217
218 gl::setMatrices( mCam );
219
220 gl::disableAlphaBlending();
221 if( mWireframe && mTubeMesh->getNumTriangles() ) {
222 gl::enableWireframe();
223 gl::color( Color( 0.2f, 0.2f, 0.5f ) );
224 gl::draw( *mTubeMesh );
225 gl::disableWireframe();
226 }
227
228 gl::enableAdditiveBlending();
229 if( mDrawMesh && mTubeMesh->getNumTriangles() ) {
230 gl::color( ColorA( 1, 1, 1, 0.25f ) );
231 gl::draw( *mTubeMesh );
232 }
233
234 if( mDrawSlices ) {
235 mTube.drawFrameSlices( 0.25f );
236 }
237
238 if( mDrawCurve ) {
239 gl::color( Color( 1, 1, 1 ) );
240 mTube.drawPs();
241 }
242
243 if( mDrawFrames ) {
244 mTube.drawFrames( 0.5f );
245 }
246}
247
248
249CINDER_APP( TubularApp, RendererGl )

Callers

nothing calls this directly

Calls 12

setMatricesFunction · 0.85
disableAlphaBlendingFunction · 0.85
enableWireframeFunction · 0.85
disableWireframeFunction · 0.85
enableAdditiveBlendingFunction · 0.85
drawFrameSlicesMethod · 0.80
drawPsMethod · 0.80
drawFramesMethod · 0.80
clearFunction · 0.50
ColorFunction · 0.50
colorFunction · 0.50
drawFunction · 0.50

Tested by

no test coverage detected