engine/EngineVideoScreen.c
void SCR_UpdateScreen (void)
{
	if(scr_disabled_for_loading)
	{
		if(realtime-scr_disabled_time > 60.0f)
		{
			scr_disabled_for_loading = false;

			Con_Printf ("load failed.\n");
		}
		else
			return;
	}

	if(!bScreenInitialized || !bConsoleInitialized)
		return;				// not initialized yet

	GL_BeginRendering(&glx,&gly,&glwidth,&glheight);

	Video.iFrameCount++;
	// Don't let us exceed a limited count.
	if (Video.iFrameCount > 100000)
		Video.iFrameCount = 0;

	// determine size of refresh window
	if(oldfov != scr_fov.value)
	{
		oldfov = scr_fov.value;
		vid.bRecalcRefDef = true;
	}

	if (oldscreensize != scr_viewsize.value)
	{
		oldscreensize = scr_viewsize.value;
		vid.bRecalcRefDef = true;
	}

	//johnfitz -- added oldsbarscale and oldsbaralpha
	if (oldsbarscale != scr_sbarscale.value)
	{
		oldsbarscale = scr_sbarscale.value;
		vid.bRecalcRefDef = true;
	}

	if (oldsbaralpha != scr_sbaralpha.value)
	{
		oldsbaralpha = scr_sbaralpha.value;
		vid.bRecalcRefDef = true;
	}
	//johnfitz

	if (vid.bRecalcRefDef)
		Screen_UpdateSize();

	// do 3D refresh drawing, and then update the screen
	Screen_SetUpToDrawConsole();

	if (cv_video_msaasamples.iValue > 0)
		VideoLayer_Enable(VIDEO_MULTISAMPLE);

	V_RenderView ();

	if (cv_video_msaasamples.iValue > 0)
		VideoLayer_Disable(VIDEO_MULTISAMPLE);

	Draw_ResetCanvas();

	//FIXME: only call this when needed
	SCR_TileClear();

	if(bDrawDialog) //new game confirm
	{
		g_menu->Draw();

		Draw_FadeScreen();
		SCR_DrawNotifyString();
	}
	else if (g_menu->GetState() & MENU_STATE_LOADING) //loading
		g_menu->Draw();
	else if(cl.intermission == 1 && key_dest == key_game) //end of level
	{}
	else if(cl.intermission == 2 && key_dest == key_game) //end of episode
		SCR_CheckDrawCenterString ();
	else
	{
		g_menu->Draw();

#ifdef VIDEO_SUPPORT_SHADERS
#ifdef VIDEO_SUPPORT_FRAMEBUFFERS
		//VideoPostProcess_Draw();
		DEBUG_FrameBufferDraw();
#endif
#endif

		SCR_DrawNet();
		SCR_DrawTurtle();
		SCR_DrawPause();
		SCR_CheckDrawCenterString ();
		SCR_DrawDevStats(); //johnfitz
		SCR_DrawClock(); //johnfitz
		Screen_DrawConsole();
		Screen_DrawFPS(); //johnfitz
	}

	V_UpdateBlend(); //johnfitz -- V_UpdatePalette cleaned up and renamed
}
/*	This is called every frame, and can also be called explicitly to flush
	text to the screen.

	WARNING: be very careful calling this from elsewhere, because the refresh
	needs almost the entire 256k of stack space!
*/
This is called every frame, and can also be called explicitly to flush
text to the screen.

be very careful calling this from elsewhere, because the refresh
needs almost the entire 256k of stack space!
This is called every frame and can also be called explicitly to flush text to the screen . be very careful calling this from elsewhere because the refresh needs almost the entire 256k of stack space!
void SCR_UpdateScreen (void)
{
	if(scr_disabled_for_loading)
	{
		if(realtime-scr_disabled_time > 60.0f)
		{
			scr_disabled_for_loading = false;
			Con_Printf ("load failed.\n");
		}
		else
			return;
	}
	if(!bScreenInitialized || !bConsoleInitialized)
		return;				
	GL_BeginRendering(&glx,&gly,&glwidth,&glheight);
	Video.iFrameCount++;
	if (Video.iFrameCount > 100000)
		Video.iFrameCount = 0;
	if(oldfov != scr_fov.value)
	{
		oldfov = scr_fov.value;
		vid.bRecalcRefDef = true;
	}
	if (oldscreensize != scr_viewsize.value)
	{
		oldscreensize = scr_viewsize.value;
		vid.bRecalcRefDef = true;
	}
	if (oldsbarscale != scr_sbarscale.value)
	{
		oldsbarscale = scr_sbarscale.value;
		vid.bRecalcRefDef = true;
	}
	if (oldsbaralpha != scr_sbaralpha.value)
	{
		oldsbaralpha = scr_sbaralpha.value;
		vid.bRecalcRefDef = true;
	}
	if (vid.bRecalcRefDef)
		Screen_UpdateSize();
	Screen_SetUpToDrawConsole();
	if (cv_video_msaasamples.iValue > 0)
		VideoLayer_Enable(VIDEO_MULTISAMPLE);
	V_RenderView ();
	if (cv_video_msaasamples.iValue > 0)
		VideoLayer_Disable(VIDEO_MULTISAMPLE);
	Draw_ResetCanvas();
	SCR_TileClear();
	if(bDrawDialog) 
	{
		g_menu->Draw();
		Draw_FadeScreen();
		SCR_DrawNotifyString();
	}
	else if (g_menu->GetState() & MENU_STATE_LOADING) 
		g_menu->Draw();
	else if(cl.intermission == 1 && key_dest == key_game) 
	{}
	else if(cl.intermission == 2 && key_dest == key_game) 
		SCR_CheckDrawCenterString ();
	else
	{
		g_menu->Draw();
#ifdef VIDEO_SUPPORT_SHADERS
#ifdef VIDEO_SUPPORT_FRAMEBUFFERS
		DEBUG_FrameBufferDraw();
#endif
#endif
		SCR_DrawNet();
		SCR_DrawTurtle();
		SCR_DrawPause();
		SCR_CheckDrawCenterString ();
		SCR_DrawDevStats(); 
		SCR_DrawClock(); 
		Screen_DrawConsole();
		Screen_DrawFPS(); 
	}
	V_UpdateBlend();  -- V_UpdatePalette cleaned up and renamed
}
void SCR_UpdateScreen ( void ) { if ( scr_disabled_for_loading ) { if ( realtime - scr_disabled_time > 60.0f ) { scr_disabled_for_loading = false ; Con_Printf ( " \n " ) ; } else return ; } if ( ! bScreenInitialized || ! bConsoleInitialized ) return ; GL_BeginRendering ( & glx , & gly , & glwidth , & glheight ) ; Video . iFrameCount ++ ; if ( Video . iFrameCount > 100000 ) Video . iFrameCount = 0 ; if ( oldfov != scr_fov . value ) { oldfov = scr_fov . value ; vid . bRecalcRefDef = true ; } if ( oldscreensize != scr_viewsize . value ) { oldscreensize = scr_viewsize . value ; vid . bRecalcRefDef = true ; } if ( oldsbarscale != scr_sbarscale . value ) { oldsbarscale = scr_sbarscale . value ; vid . bRecalcRefDef = true ; } if ( oldsbaralpha != scr_sbaralpha . value ) { oldsbaralpha = scr_sbaralpha . value ; vid . bRecalcRefDef = true ; } if ( vid . bRecalcRefDef ) Screen_UpdateSize ( ) ; Screen_SetUpToDrawConsole ( ) ; if ( cv_video_msaasamples . iValue > 0 ) VideoLayer_Enable ( VIDEO_MULTISAMPLE ) ; V_RenderView ( ) ; if ( cv_video_msaasamples . iValue > 0 ) VideoLayer_Disable ( VIDEO_MULTISAMPLE ) ; Draw_ResetCanvas ( ) ; SCR_TileClear ( ) ; if ( bDrawDialog ) { g_menu -> Draw ( ) ; Draw_FadeScreen ( ) ; SCR_DrawNotifyString ( ) ; } else if ( g_menu -> GetState ( ) & MENU_STATE_LOADING ) g_menu -> Draw ( ) ; else if ( cl . intermission == 1 && key_dest == key_game ) { } else if ( cl . intermission == 2 && key_dest == key_game ) SCR_CheckDrawCenterString ( ) ; else { g_menu -> Draw ( ) ; #ifdef VIDEO_SUPPORT_SHADERS #ifdef VIDEO_SUPPORT_FRAMEBUFFERS DEBUG_FrameBufferDraw ( ) ; #endif #endif SCR_DrawNet ( ) ; SCR_DrawTurtle ( ) ; SCR_DrawPause ( ) ; SCR_CheckDrawCenterString ( ) ; SCR_DrawDevStats ( ) ; SCR_DrawClock ( ) ; Screen_DrawConsole ( ) ; Screen_DrawFPS ( ) ; } V_UpdateBlend ( ) ; }
This is called every frame, and can also be called explicitly to flush
text to the screen.
This is called every frame and can also be called explicitly to flush text to the screen .
// not initialized yet // Don't let us exceed a limited count. // determine size of refresh window //johnfitz -- added oldsbarscale and oldsbaralpha //johnfitz // do 3D refresh drawing, and then update the screen //FIXME: only call this when needed //new game confirm //loading //end of level //end of episode //VideoPostProcess_Draw(); //johnfitz //johnfitz //johnfitz //johnfitz -- V_UpdatePalette cleaned up and renamed