mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
Start putting the pieces back together.
The renderer now gets initialized and things sort of work (qw-client will idle, though nothing is displayed). However, as the viddef stuff is broken, it segs on trying to run the overkill demo.
This commit is contained in:
parent
1d864521e9
commit
4d9c3408a1
17 changed files with 77 additions and 13 deletions
|
@ -172,7 +172,6 @@ typedef struct vid_render_data_s {
|
|||
struct cvar_s *scr_viewsize;
|
||||
struct cvar_s *graphheight;
|
||||
float min_wateralpha;
|
||||
qboolean active;
|
||||
qboolean force_fullscreen;
|
||||
qboolean inhibit_viewmodel;
|
||||
qboolean paused;
|
||||
|
|
|
@ -38,7 +38,11 @@ void Fog_StartAdditive (void);
|
|||
void Fog_StopAdditive (void);
|
||||
void Fog_Init (void);
|
||||
|
||||
void gl_R_Init (void);
|
||||
void glsl_R_Init (void);
|
||||
void sw_R_Init (void);
|
||||
void sw32_R_Init (void);
|
||||
|
||||
void R_Init_Cvars (void);
|
||||
void R_InitEfrags (void);
|
||||
void R_ClearState (void);
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#define R_DrawSpriteModel gl_R_DrawSpriteModel
|
||||
#define R_DrawWaterSurfaces gl_R_DrawWaterSurfaces
|
||||
#define R_DrawWorld gl_R_DrawWorld
|
||||
#define R_Init gl_R_Init
|
||||
#define R_InitBubble gl_R_InitBubble
|
||||
#define R_InitGraphTextures gl_R_InitGraphTextures
|
||||
#define R_InitParticles gl_R_InitParticles
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#define R_DrawSpriteModel glsl_R_DrawSpriteModel
|
||||
#define R_DrawWaterSurfaces glsl_R_DrawWaterSurfaces
|
||||
#define R_DrawWorld glsl_R_DrawWorld
|
||||
#define R_Init glsl_R_Init
|
||||
#define R_InitBubble glsl_R_InitBubble
|
||||
#define R_InitGraphTextures glsl_R_InitGraphTextures
|
||||
#define R_InitParticles glsl_R_InitParticles
|
||||
|
|
|
@ -341,4 +341,7 @@ R_Init_Cvars (void)
|
|||
scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE, viewsize_f,
|
||||
"Set the screen size 30 minimum, 120 maximum");
|
||||
R_Particles_Init_Cvars ();
|
||||
|
||||
vr_data.graphheight = r_graphheight;
|
||||
vr_data.scr_viewsize = scr_viewsize;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
|
|||
#include "QF/render.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "QF/plugin/general.h"
|
||||
|
||||
#include "r_internal.h"
|
||||
|
||||
cvar_t *vidrend_plugin;
|
||||
|
@ -76,4 +78,6 @@ R_Init (void)
|
|||
r_funcs = vidrendmodule->functions->vid_render;
|
||||
mod_funcs = r_funcs->model_funcs;
|
||||
r_data = vidrendmodule->data->vid_render;
|
||||
|
||||
vidrendmodule->functions->general->p_Init ();
|
||||
}
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
#define R_DrawSurface sw32_R_DrawSurface
|
||||
#define R_EmitEdge sw32_R_EmitEdge
|
||||
#define R_GenerateSpans sw32_R_GenerateSpans
|
||||
#define R_Init sw32_R_Init
|
||||
#define R_InitParticles sw32_R_InitParticles
|
||||
#define R_InitSky sw32_R_InitSky
|
||||
#define R_InitTurb sw32_R_InitTurb
|
||||
|
|
|
@ -40,7 +40,7 @@ vid_render_data_t vid_render_data = {
|
|||
0,
|
||||
0, 0,
|
||||
0.0,
|
||||
true, false, false, false,
|
||||
false, false, false,
|
||||
0,
|
||||
0, 0,
|
||||
0,
|
||||
|
|
|
@ -112,7 +112,22 @@ vid_render_funcs_t gl_vid_render_funcs = {
|
|||
&model_funcs
|
||||
};
|
||||
|
||||
static void
|
||||
gl_vid_render_init (void)
|
||||
{
|
||||
m_funcs = &model_funcs;
|
||||
R_Init_Cvars ();
|
||||
gl_R_Init ();
|
||||
}
|
||||
|
||||
static void
|
||||
gl_vid_render_shutdown (void)
|
||||
{
|
||||
}
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
gl_vid_render_init,
|
||||
gl_vid_render_shutdown,
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
|
|
@ -112,7 +112,22 @@ vid_render_funcs_t glsl_vid_render_funcs = {
|
|||
&model_funcs
|
||||
};
|
||||
|
||||
static void
|
||||
glsl_vid_render_init (void)
|
||||
{
|
||||
m_funcs = &model_funcs;
|
||||
R_Init_Cvars ();
|
||||
glsl_R_Init ();
|
||||
}
|
||||
|
||||
static void
|
||||
glsl_vid_render_shutdown (void)
|
||||
{
|
||||
}
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
glsl_vid_render_init,
|
||||
glsl_vid_render_shutdown,
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
|
|
@ -107,7 +107,22 @@ vid_render_funcs_t sw_vid_render_funcs = {
|
|||
&model_funcs
|
||||
};
|
||||
|
||||
static void
|
||||
sw_vid_render_init (void)
|
||||
{
|
||||
m_funcs = &model_funcs;
|
||||
R_Init_Cvars ();
|
||||
sw_R_Init ();
|
||||
}
|
||||
|
||||
static void
|
||||
sw_vid_render_shutdown (void)
|
||||
{
|
||||
}
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
sw_vid_render_init,
|
||||
sw_vid_render_shutdown,
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
|
|
@ -112,7 +112,22 @@ vid_render_funcs_t sw32_vid_render_funcs = {
|
|||
&model_funcs
|
||||
};
|
||||
|
||||
static void
|
||||
sw32_vid_render_init (void)
|
||||
{
|
||||
m_funcs = &model_funcs;
|
||||
R_Init_Cvars ();
|
||||
sw32_R_Init ();
|
||||
}
|
||||
|
||||
static void
|
||||
sw32_vid_render_shutdown (void)
|
||||
{
|
||||
}
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
sw32_vid_render_init,
|
||||
sw32_vid_render_shutdown,
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
|
|
@ -473,13 +473,11 @@ CL_SetState (cactive_t state)
|
|||
if (old_state != state) {
|
||||
if (state == ca_active) {
|
||||
// entering active state
|
||||
r_data->active = true;
|
||||
Key_SetKeyDest (key_game);
|
||||
IN_ClearStates ();
|
||||
VID_SetCaption ("");
|
||||
} else if (old_state == ca_active) {
|
||||
// leaving active state
|
||||
r_data->active = false;
|
||||
Key_SetKeyDest (key_console);
|
||||
VID_SetCaption ("Disconnected");
|
||||
}
|
||||
|
|
|
@ -705,7 +705,7 @@ V_CalcRefdef (void)
|
|||
void
|
||||
V_RenderView (void)
|
||||
{
|
||||
if (cls.signon != SIGNONS)
|
||||
if (cls.state != ca_active)
|
||||
return;
|
||||
|
||||
// don't allow cheats in multiplayer
|
||||
|
|
|
@ -1143,7 +1143,6 @@ CL_SetState (cactive_t state)
|
|||
if (old_state == ca_active) {
|
||||
// leaving active state
|
||||
IN_ClearStates ();
|
||||
r_data->active = false;
|
||||
Key_SetKeyDest (key_console);
|
||||
|
||||
// Auto demo recorder stops here
|
||||
|
@ -1153,7 +1152,6 @@ CL_SetState (cactive_t state)
|
|||
// entering active state
|
||||
VID_SetCaption (cls.servername->str);
|
||||
IN_ClearStates ();
|
||||
r_data->active = true;
|
||||
Key_SetKeyDest (key_game);
|
||||
|
||||
// Auto demo recorder starts here
|
||||
|
@ -1183,6 +1181,7 @@ CL_Init (void)
|
|||
IN_Init (cl_cbuf);
|
||||
Mod_Init ();
|
||||
R_Init ();
|
||||
r_data->lightstyle = cl.lightstyle;
|
||||
|
||||
PI_RegisterPlugins (client_plugin_list);
|
||||
Con_Init ("client");
|
||||
|
|
|
@ -76,7 +76,7 @@ SCR_CShift (void)
|
|||
mleaf_t *leaf;
|
||||
int contents = CONTENTS_EMPTY;
|
||||
|
||||
if (r_data->active && cl.worldmodel) {
|
||||
if (cls.state == ca_active && cl.worldmodel) {
|
||||
leaf = Mod_PointInLeaf (r_data->refdef->vieworg, cl.worldmodel);
|
||||
contents = leaf->contents;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ CL_UpdateScreen (double realtime)
|
|||
index = 0;
|
||||
|
||||
// don't allow cheats in multiplayer
|
||||
if (r_data->active) {
|
||||
if (cls.state == ca_active) {
|
||||
if (cl.watervis)
|
||||
r_data->min_wateralpha = 0.0;
|
||||
else
|
||||
|
|
|
@ -715,7 +715,7 @@ V_RenderView (void)
|
|||
{
|
||||
cl.simangles[ROLL] = 0; // FIXME @@@
|
||||
|
||||
if (!r_data->active)
|
||||
if (cls.state != ca_active)
|
||||
return;
|
||||
|
||||
view_frame = &cl.frames[cls.netchan.incoming_sequence & UPDATE_MASK];
|
||||
|
|
Loading…
Reference in a new issue