================== SCR_UpdateScreen This is called every frame, and can also be called explicitly to flush text to the screen. ================== */
| 480 | ================== |
| 481 | */ |
| 482 | void 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 | // |
no test coverage detected