/* ================ R_RenderScene ================ */ void R_RenderScene (void) { R_SetupScene (); //johnfitz -- this does everything that should be done once per call to RenderScene Fog_EnableGFog (); //johnfitz Sky_DrawSky (); //johnfitz R_DrawWorld (); S_ExtraUpdate (); // don't let sound get messed up if going slow R_DrawShadows (); //johnfitz -- render entity shadows R_DrawEntitiesOnList (false); //johnfitz -- false means this is the pass for nonalpha entities R_DrawTextureChains_Water (); //johnfitz -- drawn here since they might have transparency R_DrawEntitiesOnList (true); //johnfitz -- true means this is the pass for alpha entities R_RenderDlights (); //triangle fan dlights -- johnfitz -- moved after water R_DrawParticles (); Fog_DisableGFog (); //johnfitz R_DrawViewModel (); //johnfitz -- moved here from R_RenderView R_ShowTris (); //johnfitz R_ShowBoundingBoxes (); //johnfitz }
/* ================== V_PostRender ================== */ void V_PostRender( void ) { R_Set2DMode( true ); if( cls.state == ca_active ) { CL_DrawHUD( CL_ACTIVE ); #ifndef NO_VGUI VGui_Paint(); #endif } if( cls.scrshot_action == scrshot_inactive || cls.scrshot_action == scrshot_normal ) { SCR_RSpeeds(); SCR_NetSpeeds(); SCR_DrawFPS(); CL_DrawDemoRecording(); R_ShowTextures(); CL_DrawHUD( CL_CHANGELEVEL ); Con_DrawConsole(); UI_UpdateMenu( host.realtime ); Con_DrawDebug(); // must be last S_ExtraUpdate(); } SCR_MakeScreenShot(); R_EndFrame(); }
/* ================ R_RenderScene r_refdef must be set before the first call ================ */ void R_RenderScene (void) { R_SetupFrame (); R_SetFrustum (); R_SetupGL (); R_MarkLeaves (); // done here so we know if we're in water R_DrawWorld (); // adds static entities to the list S_ExtraUpdate (); // don't let sound get messed up if going slow R_DrawEntitiesOnList (); GL_DisableMultitexture(); R_RenderDlights (); R_DrawParticles (); #ifdef GLTEST Test_Draw (); #endif }
void R_RenderScene(void) { R_PushDlights(); Light_Animate(); r_framecount++; R_SetupScene(); Fog_EnableGFog(); //johnfitz Sky_Draw(); //johnfitz World_Draw(); S_ExtraUpdate(); // don't let sound get messed up if going slow R_DrawShadows(); R_DrawEntitiesOnList(false); World_DrawWater(); R_DrawEntitiesOnList(true); Particle_Draw(); Light_Draw(); Fog_DisableGFog(); R_DrawViewModel(); Video_ShowBoundingBoxes(); }
/* ================ R_RenderScene r_refdef must be set before the first call ================ */ void R_RenderScene (void) { R_SetupFrame (); R_SetFrustum (); R_SetupGL (); R_MarkLeaves (); // done here so we know if we're in water /* Experimenting with lighting. glEnable(GL_LIGHTING); glShadeModel(GL_SMOOTH); glEnable(GL_LIGHT0); glEnable(GL_COLOR_MATERIAL); GLfloat specular[4] = {1, 1, 1, 1}; glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular); int li = 0; for (; li < 8; li += 1) { if (cl_dlights[li].die >= cl.time && cl_dlights[li].radius) { GLfloat pos[4] = { cl_dlights[li].origin[0], cl_dlights[li].origin[1], cl_dlights[li].origin[2], 1.0}; glLightfv(GL_LIGHT0+li, GL_POSITION, pos); glLightf(GL_LIGHT0+li, GL_CONSTANT_ATTENUATION, 0.1); glEnable(GL_LIGHT0+li); } else { break; } } */ R_DrawWorld (); // adds static entities to the list S_ExtraUpdate (); // don't let sound get messed up if going slow /*for (li -=1; li >= 0; li -= 1) { glDisable(GL_LIGHT0+li); } glDisable(GL_LIGHTING);*/ R_DrawEntitiesOnList (); GL_DisableMultitexture(); R_RenderDlights (); R_DrawParticles (); #ifdef GLTEST Test_Draw (); #endif }
void CL_ExtraUpdate( void ) { if( !cls.initialized ) return; #ifdef XASH_SDL if( !m_valvehack ) m_valvehack = Cvar_Get("m_valvehack", "0", CVAR_ARCHIVE, "Enable mouse hack for valve client.so"); if( !m_valvehack->integer ) #endif clgame.dllFuncs.IN_Accumulate(); S_ExtraUpdate(); }
/* ================== V_PostRender ================== */ void V_PostRender( void ) { qboolean draw_2d = false; R_Set2DMode( true ); if( cls.state == ca_active ) { SCR_TileClear(); CL_DrawHUD( CL_ACTIVE ); #ifdef XASH_VGUI VGui_Paint(); #endif } switch( cls.scrshot_action ) { case scrshot_inactive: case scrshot_normal: case scrshot_snapshot: draw_2d = true; break; } if( draw_2d ) { SCR_RSpeeds(); SCR_NetSpeeds(); SCR_DrawFPS(); SV_DrawOrthoTriangles(); CL_DrawDemoRecording(); R_ShowTextures(); CL_DrawHUD( CL_CHANGELEVEL ); Con_DrawConsole(); UI_UpdateMenu( host.realtime ); Con_DrawVersion(); Con_DrawDebug(); // must be last S_ExtraUpdate(); } SCR_MakeScreenShot(); R_EndFrame(); }
void CL_ExtraUpdate( void ) { clgame.dllFuncs.IN_Accumulate(); S_ExtraUpdate(); }