MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SCR_UpdateScreen

Function SCR_UpdateScreen

code/client/cl_scrn.cpp:482–517  ·  view source on GitHub ↗

================== SCR_UpdateScreen This is called every frame, and can also be called explicitly to flush text to the screen. ================== */

Source from the content-addressed store, hash-verified

480==================
481*/
482void SCR_UpdateScreen( void ) {
483 static int recursive;
484
485 if ( !scr_initialized ) {
486 return; // not initialized yet
487 }
488
489 // load the ref / ui / cgame if needed
490 CL_StartHunkUsers();
491
492 if ( ++recursive > 2 ) {
493 Com_Error( ERR_FATAL, "SCR_UpdateScreen: recursively called" );
494 }
495 recursive = qtrue;
496
497 // If there is no VM, there are also no rendering commands issued. Stop the renderer in
498 // that case.
499 if ( cls.uiStarted )
500 {
501 // if running in stereo, we need to draw the frame twice
502 if ( cls.glconfig.stereoEnabled ) {
503 SCR_DrawScreenField( STEREO_LEFT );
504 SCR_DrawScreenField( STEREO_RIGHT );
505 } else {
506 SCR_DrawScreenField( STEREO_CENTER );
507 }
508
509 if ( com_speeds->integer ) {
510 re.EndFrame( &time_frontend, &time_backend );
511 } else {
512 re.EndFrame( NULL, NULL );
513 }
514 }
515
516 recursive = 0;
517}
518
519// this stuff is only used by the savegame (SG) code for screenshots...
520//

Callers 4

Console_KeyFunction · 0.70
CL_MapLoadingFunction · 0.70
CL_FrameFunction · 0.70
CL_CgameSystemCallsFunction · 0.70

Calls 3

CL_StartHunkUsersFunction · 0.70
SCR_DrawScreenFieldFunction · 0.70
Com_ErrorFunction · 0.50

Tested by

no test coverage detected