/* ================== V_RenderView The player's clipping box goes from (-16 -16 -24) to (16 16 32) from the entity origin, so any view position inside that will be valid ================== */ void V_RenderView (void) { if (con_forcedup) return; // don't allow cheats in multiplayer if (cl.maxclients > 1) { Cvar_Set ("scr_ofsx", "0"); Cvar_Set ("scr_ofsy", "0"); Cvar_Set ("scr_ofsz", "0"); } if (cl.intermission) { // intermission / finale rendering V_CalcIntermissionRefdef (); } else { if (!cl.paused /* && (sv.maxclients > 1 || key_dest == key_game) */ ) V_CalcRefdef (); } R_PushDlights (); if (lcd_x.value) { // // render two interleaved views // int i; vid.rowbytes <<= 1; vid.aspect *= 0.5f; r_refdef.viewangles[YAW] -= lcd_yaw.value; for (i=0 ; i<3 ; i++) r_refdef.vieworg[i] -= right[i]*lcd_x.value; R_RenderView (); vid.buffer += vid.rowbytes>>1; R_PushDlights (); r_refdef.viewangles[YAW] += lcd_yaw.value*2; for (i=0 ; i<3 ; i++) r_refdef.vieworg[i] += 2*right[i]*lcd_x.value; R_RenderView (); vid.buffer -= vid.rowbytes>>1; r_refdef.vrect.height <<= 1; vid.rowbytes >>= 1; vid.aspect *= 2; }
/* ================== V_RenderView The player's clipping box goes from (-16 -16 -24) to (16 16 32) from the entity origin, so any view position inside that will be valid ================== */ void V_RenderView(void) { if (con_forcedup) return; // don't allow cheats in multiplayer if (cl.maxclients > 1) { Cvar_Set("scr_ofsx", "0"); Cvar_Set("scr_ofsy", "0"); Cvar_Set("scr_ofsz", "0"); } if (cl.intermission) { // intermission / finale rendering V_CalcIntermissionRefdef(); } else { if (!cl.paused /* && (sv.maxclients > 1 || key_dest == key_game) */ ) V_CalcRefdef(); } R_PushDlights(); R_RenderView(); #ifndef GLQUAKE if (crosshair.value) Draw_Crosshair(); #endif }
/* ================ R_RenderScene RI.refdef must be set before the first call ================ */ void R_RenderScene( const ref_params_t *fd ) { RI.refdef = *fd; if( !cl.worldmodel && RI.drawWorld ) Host_Error( "R_RenderScene: NULL worldmodel\n" ); R_PushDlights(); R_SetupFrame(); R_SetupFrustum(); R_SetupGL(); R_Clear( ~0 ); R_MarkLeaves(); R_CheckFog(); R_DrawWorld(); CL_ExtraUpdate (); // don't let sound get messed up if going slow R_DrawEntitiesOnList(); R_DrawWaterSurfaces(); R_EndGL(); }
/* =============== R_SetupScene -- johnfitz -- this is the stuff that needs to be done once per eye in stereo mode =============== */ void R_SetupScene (void) { R_PushDlights (); R_AnimateLight (); r_framecount++; R_SetupGL (); }
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(); }
void CRender::FrameBegin( void ) { if ( !host_state.worldmodel ) return; // don't allow cheats in multiplayer #if !defined( _DEBUG ) if (cl.maxclients > 1) { // mat_fullbright.SetValue( 0 ); // mat_drawflat.SetValue( 0 ); mat_reversedepth.SetValue( 0 ); mat_luxels.SetValue( 0 ); mat_normals.SetValue( 0 ); } #endif // This has to be before R_AnimateLight because it uses it to // set the frame number of changed lightstyles r_framecount++; R_AnimateLight (); R_PushDlights(); if (!r_norefresh.GetInt()) { m_frameStartTime = Sys_FloatTime (); } UpdateStudioRenderConfig(); materialSystemInterface->BeginFrame(); g_pStudioRender->BeginFrame(); }
/* =============== R_SetupScene =============== */ void R_SetupScene (void) { render_pass_index = 0; vkCmdBeginRenderPass(vulkan_globals.command_buffer, &vulkan_globals.main_render_pass_begin_infos[render_warp ? 0 : 1], VK_SUBPASS_CONTENTS_INLINE); R_PushDlights(); R_AnimateLight (); r_framecount++; R_SetupMatrix (); }
void V_RenderView (void) { char *p; cl.simangles[ROLL] = 0; // FIXME @@@ if (cls.state != ca_active) { V_CalcBlend (); return; } view_frame = &cl.frames[cl.validsequence & UPDATE_MASK]; if (!cls.nqdemoplayback) view_message = view_frame->playerstate[cl.viewplayernum]; DropPunchAngle (); if (cl.intermission) // intermission / finale rendering V_CalcIntermissionRefdef (); else V_CalcRefdef (); R_PushDlights (); r_refdef2.time = cl.time; // restrictions r_refdef2.allow_cheats = (Info_ValueForKey(cl.serverinfo, "*cheats")[0] && com_serveractive) || cls.demoplayback; if (cls.demoplayback || cl.spectator) { r_refdef2.allow_lumas = true; r_refdef2.max_fbskins = 1; r_refdef2.max_watervis = 1; } else { r_refdef2.allow_lumas = !strcmp(Info_ValueForKey(cl.serverinfo, "24bit_fbs"), "0") ? false : true; r_refdef2.max_fbskins = *(p = Info_ValueForKey(cl.serverinfo, "fbskins")) ? bound(0, Q_atof(p), 1) : cl.teamfortress ? 0 : 1; r_refdef2.max_watervis = *(p = Info_ValueForKey(cl.serverinfo, "watervis")) ? bound(0, Q_atof(p), 1) : 0; } // r_refdef2.viewplayernum = Cam_PlayerNum(); // r_refdef2.lightstyles = cl_lightstyle; R_RenderView (); }