MCPcopy Create free account
hub / github.com/assaultcube/AC / show_out_of_renderloop_progress

Function show_out_of_renderloop_progress

source/src/renderhud.cpp:1240–1284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1238}
1239
1240void 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}

Callers 5

resolverwaitFunction · 0.85
connectwithtimeoutFunction · 0.85
retrieveserversFunction · 0.85

Calls 3

c2skeepaliveFunction · 0.85
barFunction · 0.85
draw_textFunction · 0.85

Tested by

no test coverage detected