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

Method draw

samples/Earthquake/src/EarthquakeApp.cpp:146–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void EarthquakeApp::draw()
147{
148 gl::clear( Color( 1, 0, 0 ) );
149
150 gl::ScopedDepth depth( true );
151 gl::ScopedColor color( 1, 1, 1 );
152
153 // Draw stars.
154 if( mShowStars ) {
155 gl::ScopedTextureBind tex0( mStars, 0 );
156 gl::ScopedFaceCulling cull( true, GL_FRONT );
157 mStarSphere->draw();
158 }
159
160 // Draw Earth.
161 if( mShowEarth ) {
162 mEarth.draw();
163 }
164
165 // Draw quakes.
166 if( mShowQuakes ) {
167 mEarth.drawQuakes();
168 }
169
170 // Draw labels.
171 if( mShowText ) {
172 mEarth.drawQuakeLabelsOnSphere( mPov.mEyeNormal, mPov.mDist );
173 }
174
175 if( mSaveFrames ) {
176 static int currentFrame = 0;
177 writeImage( getHomeDirectory() / "CinderScreengrabs" / ( "Highoutput_" + toString( currentFrame++ ) + ".png" ), copyWindowSurface() );
178 }
179}
180
181void EarthquakeApp::parseEarthquakes( const string &url )
182{

Callers

nothing calls this directly

Calls 8

writeImageFunction · 0.85
getHomeDirectoryFunction · 0.85
copyWindowSurfaceFunction · 0.85
drawQuakesMethod · 0.80
clearFunction · 0.50
ColorFunction · 0.50
toStringFunction · 0.50

Tested by

no test coverage detected