| 1238 | } |
| 1239 | |
| 1240 | void show_out_of_renderloop_progress(float bar1, const char *text1, float bar2, const char *text2) // also used during loading |
| 1241 | { |
| 1242 | c2skeepalive(); |
| 1243 | |
| 1244 | glDisable(GL_DEPTH_TEST); |
| 1245 | glMatrixMode(GL_MODELVIEW); |
| 1246 | glPushMatrix(); |
| 1247 | glLoadIdentity(); |
| 1248 | glMatrixMode(GL_PROJECTION); |
| 1249 | glPushMatrix(); |
| 1250 | glLoadIdentity(); |
| 1251 | glOrtho(0, VIRTW*1.2f, VIRTH*1.2f, 0, -1, 1); |
| 1252 | |
| 1253 | glLineWidth(3); |
| 1254 | |
| 1255 | if(text1) |
| 1256 | { |
| 1257 | bar(1, 1, 0.1f, 0.1f, 0.1f); |
| 1258 | if(bar1>0) bar(bar1, 1, 0.2f, 0.2f, 0.2f); |
| 1259 | } |
| 1260 | |
| 1261 | if(bar2>0) |
| 1262 | { |
| 1263 | bar(1, 3, 0.1f, 0.1f, 0.1f); |
| 1264 | bar(bar2, 3, 0.2f, 0.2f, 0.2f); |
| 1265 | } |
| 1266 | |
| 1267 | glLineWidth(1); |
| 1268 | |
| 1269 | glEnable(GL_BLEND); |
| 1270 | glEnable(GL_TEXTURE_2D); |
| 1271 | |
| 1272 | if(text1) draw_text(text1, 2*FONTH, 1*FONTH + FONTH/2); |
| 1273 | if(bar2>0) draw_text(text2, 2*FONTH, 3*FONTH + FONTH/2); |
| 1274 | |
| 1275 | glDisable(GL_TEXTURE_2D); |
| 1276 | glDisable(GL_BLEND); |
| 1277 | |
| 1278 | glPopMatrix(); |
| 1279 | glMatrixMode(GL_MODELVIEW); |
| 1280 | glPopMatrix(); |
| 1281 | |
| 1282 | glEnable(GL_DEPTH_TEST); |
| 1283 | SDL_GL_SwapWindow(screen); |
| 1284 | } |
no test coverage detected