MCPcopy Create free account
hub / github.com/demoth/jake2 / TimeRefresh_f

Method TimeRefresh_f

client/src/main/java/jake2/client/SCR.java:600–631  ·  view source on GitHub ↗
(List<String> args)

Source from the content-addressed store, hash-verified

598 * ================ SCR_TimeRefresh_f ================
599 */
600 private static void TimeRefresh_f(List<String> args) {
601 int i;
602 int start, stop;
603 float time;
604
605 if (cls.state != ca_active)
606 return;
607
608 start = Timer.Milliseconds();
609
610 if (args.size() == 2) { // run without page flipping
611 ClientGlobals.re.BeginFrame(0);
612 for (i = 0; i < 128; i++) {
613 ClientGlobals.cl.refdef.viewangles[1] = i / 128.0f * 360.0f;
614 ClientGlobals.re.RenderFrame(ClientGlobals.cl.refdef);
615 }
616 ClientGlobals.re.EndFrame();
617 } else {
618 for (i = 0; i < 128; i++) {
619 ClientGlobals.cl.refdef.viewangles[1] = i / 128.0f * 360.0f;
620
621 ClientGlobals.re.BeginFrame(0);
622 ClientGlobals.re.RenderFrame(ClientGlobals.cl.refdef);
623 ClientGlobals.re.EndFrame();
624 }
625 }
626
627 stop = Timer.Milliseconds();
628 time = (stop - start) / 1000.0f;
629 Com.Printf("%f seconds (%f fps)\n", new Vargs(2).add(time).add(
630 128.0f / time));
631 }
632
633 static void DirtyScreen() {
634 AddDirtyPoint(0, 0);

Callers

nothing calls this directly

Calls 7

MillisecondsMethod · 0.95
PrintfMethod · 0.95
sizeMethod · 0.80
BeginFrameMethod · 0.65
RenderFrameMethod · 0.65
EndFrameMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected