mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +00:00
[renderer] Make R_RenderView private
This is actually a better solution to the renderer directly accessing
client code than provided by 7e078c7f9c
.
Essentially, V_RenderView should not have been calling R_RenderView, and
CL_UpdateScreen should have been calling V_RenderView directly. The
issue was that the renderers expected the world entity model to be valid
at all times. Now, R_RenderView checks the world entity model's validity
and immediately bails if it is not, and R_ClearState (which is called
whenever the client disconnects and thus no longer has a world to
render) clears the world entity model. Thus R_RenderView can (and is)
now called unconditionally from within the renderer, simplifying
renderer-specific variants.
This commit is contained in:
parent
eb828007e9
commit
84a24dbb34
27 changed files with 42 additions and 55 deletions
|
@ -148,7 +148,7 @@ typedef struct vid_render_funcs_s {
|
|||
void (*Fog_ParseWorldspawn) (struct plitem_s *worldspawn);
|
||||
|
||||
void (*R_Init) (void);
|
||||
void (*R_RenderFrame) (SCR_Func scr_3dfunc, SCR_Func *scr_funcs);
|
||||
void (*R_RenderFrame) (SCR_Func *scr_funcs);
|
||||
void (*R_ClearState) (void);
|
||||
void (*R_LoadSkys) (const char *);
|
||||
void (*R_NewMap) (model_t *worldmodel, model_t **models, int num_models);
|
||||
|
@ -158,7 +158,6 @@ typedef struct vid_render_funcs_s {
|
|||
dlight_t *(*R_AllocDlight) (int key);
|
||||
entity_t *(*R_AllocEntity) (void);
|
||||
void (*R_MaxDlightsCheck) (struct cvar_s *var);
|
||||
void (*R_RenderView) (void);
|
||||
void (*R_DecayLights) (double frametime);
|
||||
|
||||
void (*R_ViewChanged) (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue