Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
/*
================
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
}
Ejemplo n.º 3
0
/*	Hacky way of rendering a 3D skybox.
		- Consider rendering 3D skybox once into envmap?
		- Consider using FBO instead and somehow spanning it?
*/
void Sky_Draw3DWorld(void)
{
	MathVector3f_t oldorg;

	// Don't let us render twice.
	if (!sky_camera || r_refdef.sky)
		return;

	// Update view position.
	plVectorCopy3f(r_refdef.vieworg, oldorg);
	plVectorCopy3f(sky_camerapos, r_refdef.vieworg);
	
	R_SetupView();
	R_SetupScene();

	glScalef(2.0f, 2.0f, 2.0f);
	glTranslatef(
		sky_camerapos[0] - oldorg[0],
		sky_camerapos[1] - oldorg[1],
		sky_camerapos[2] - oldorg[2]
	);

	r_refdef.sky = true;
	World_Draw();
	r_refdef.sky = false;

	// Restore view position.
	plVectorCopy3f(oldorg, r_refdef.vieworg);

	// Setup the view again, urgh.
	R_SetupView();
}