Before any of this happens:
Client Work Setup Before Rendering
1. Client Receives Entities From Server: Server sends the entities it thinks the client can see
2. Client Builds Entity List: Client takes that list of entities, adds to a "draw list" and updates their positions and angles (rotating items update spin here).
3. (Hopefully update the particles for entities here).
Before Rendering Frame
Do a whole ton of calculations before we can even begin to draw ...
1. Determine Screen Viewport for 3D: From viewsize and fov cvars.
2. Make Modifications To The View: For bobbing, damage flashes, kicks, rolling, punchangles, chase_active 1, death, stair stepping smoothing.
3. Determine Client Side Visibility: Will be used later for determining surfaces of the map to draw, what static entities are visible, dynamic lighting
(* A static entity is a non-interactive part of the world, the server sends it only once to a client. They cannot change even in QuakeC.)
4. From Visibility Info Determine Content Blend: Are we in water or slime or lava ... Determine that color for the screen.
5. Update Overall Blend: Do we have a damage blend or pickup blend from a previous frame still in effect? If so, add that in. Add powerup blend.
(* FitzQuake does its waterwarp effect here, messing with the effective fov a little in each direction.)
7. Calculate Frustum Planes: From field of view, origin and angles, will be used to ignore surfaces and entities that are behind us. (i.e. Not in our "cone of vision")
The "Action" Part Prior To Rendering (Uses above calcs)
8. Mark Every Map Surface We Want To Draw. Based on visibility. And using frustum culling.
9. Add Static Entities.
10. Build Draw Lists of Surfaces. "Texture chains" by texture name.
11. Update Dynamic Lighting For Visible Surfaces.
12. (Hopefully, upload any changed ligtmaps now instead of doing it as we are drawing )
13. (Hopefully, run through all the visible entities and do frame lerping calcs now if ent will show up in the frame and grab lighting too).
Rendering Initialization For Frame
14. Clear Color/Depth Buffer, Set Viewport, Set Projection Matrix (Frustum/Fov/Farclip), Set ModelView Matrix (viewer origin and angles).
15. Set Quake default 3D capabilities (fixed pipeline stuffs)
16. Draw the Sky.
16. Draw the World (In Groups of Each Texture). World = the static and unchanging part of the map. (Not lifts, doors, entities of any kind).
(* Bind the first texture used, draw every surface we can see. Do the next texture. Repeat).
17. Draw the Entities.
(* GLQuake drew sprites last.)
18. Draw the Water. Water is saved for last because it could be translucent (r_wateralpha) and alpha blending doesn't mix well with non-alpha blending.
19. Draw Flash Blends. Bubble spheres of color, if gl_flashblend is 1.
20. Draw particles.
(* GLQuake updated the particles here while drawing them.)
21. Draw the View Model. (Your shotgun or axe).
22. Add Content Blend From #5: Paint the whole screen with a blended quad of the blend color.
23. Decay Dynamic View Blend: Reduce damage blend, bonus flash.
24. Decay Dynamic Lights. Reduce the amount of flash from a rocket being fired, explosion, etc.