| 144 | } |
| 145 | |
| 146 | void 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 | |
| 181 | void EarthquakeApp::parseEarthquakes( const string &url ) |
| 182 | { |
nothing calls this directly
no test coverage detected