// move particles
CL_MoveParticles();
+ R_MoveExplosions();
// link stuff
CL_RelinkWorld();
#include "cl_collision.h"
cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100"};
-cvar_t scr_fov = {CVAR_SAVE, "fov","90"}; // 10 - 170
+cvar_t scr_fov = {CVAR_SAVE, "fov","90"}; // 1 - 170
cvar_t scr_conspeed = {CVAR_SAVE, "scr_conspeed","900"}; // LordHavoc: quake used 300
cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "1"};
cvar_t scr_conbrightness = {CVAR_SAVE, "scr_conbrightness", "0.2"};
r_refdef.drawqueuesize += dq->size;
}
-/*
-====================
-CalcFov
-====================
-*/
-float CalcFov (float fov_x, float width, float height)
-{
- // calculate vision size and alter by aspect, then convert back to angle
- return atan (height / (width / tan(fov_x/360*M_PI))) * 360 / M_PI;
-}
-
-/*
-=================
-SCR_CalcRefdef
-
-Must be called whenever vid changes
-Internal use only
-=================
-*/
-static void SCR_CalcRefdef (void)
-{
- float size;
- int contents;
-
-//========================================
-
-// bound viewsize
- if (scr_viewsize.value < 30)
- Cvar_Set ("viewsize","30");
- if (scr_viewsize.value > 120)
- Cvar_Set ("viewsize","120");
-
-// bound field of view
- if (scr_fov.value < 10)
- Cvar_Set ("fov","10");
- if (scr_fov.value > 170)
- Cvar_Set ("fov","170");
-
-// intermission is always full screen
- if (cl.intermission)
- {
- size = 1;
- sb_lines = 0;
- }
- else
- {
- if (scr_viewsize.value >= 120)
- sb_lines = 0; // no status bar at all
- else if (scr_viewsize.value >= 110)
- sb_lines = 24; // no inventory
- else
- sb_lines = 24+16+8;
- size = scr_viewsize.value * (1.0 / 100.0);
- }
-
- if (size >= 1)
- {
- r_refdef.width = vid.realwidth;
- r_refdef.height = vid.realheight;
- r_refdef.x = 0;
- r_refdef.y = 0;
- }
- else
- {
- r_refdef.width = vid.realwidth * size;
- r_refdef.height = vid.realheight * size;
- r_refdef.x = (vid.realwidth - r_refdef.width)/2;
- r_refdef.y = (vid.realheight - r_refdef.height)/2;
- }
-
- r_refdef.width = bound(0, r_refdef.width, vid.realwidth);
- r_refdef.height = bound(0, r_refdef.height, vid.realheight);
- r_refdef.x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width) + vid.realx;
- r_refdef.y = bound(0, r_refdef.y, vid.realheight - r_refdef.height) + vid.realy;
-
- // LordHavoc: viewzoom (zoom in for sniper rifles, etc)
- r_refdef.fov_x = scr_fov.value * cl.viewzoom;
- r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height);
-
- if (cl.worldmodel)
- {
- Mod_CheckLoaded(cl.worldmodel);
- contents = CL_PointSuperContents(r_vieworigin);
- if (contents & SUPERCONTENTS_LIQUIDSMASK)
- {
- r_refdef.fov_x *= (sin(cl.time * 4.7) * 0.015 + 0.985);
- r_refdef.fov_y *= (sin(cl.time * 3.0) * 0.015 + 0.985);
- }
- }
-}
-
/*
==================
SCR_ScreenShot_f
vid.conheight = 240;*/
SCR_SetUpToDrawConsole();
-
- // determine size of refresh window
- SCR_CalcRefdef();
}
extern void R_Shadow_EditLights_DrawSelectedLightProperties(void);
#include "quakedef.h"
#include "image.h"
#include "jpeg.h"
+#include "cl_collision.h"
cvar_t gl_mesh_drawrangeelements = {0, "gl_mesh_drawrangeelements", "1"};
cvar_t gl_mesh_testarrayelement = {0, "gl_mesh_testarrayelement", "0"};
{
}
+cvar_t scr_zoomwindow = {CVAR_SAVE, "scr_zoomwindow", "0"};
+cvar_t scr_zoomwindow_viewsizex = {CVAR_SAVE, "scr_zoomwindow_viewsizex", "20"};
+cvar_t scr_zoomwindow_viewsizey = {CVAR_SAVE, "scr_zoomwindow_viewsizey", "20"};
+cvar_t scr_zoomwindow_fov = {CVAR_SAVE, "scr_zoomwindow_fov", "20"};
+
void gl_backend_init(void)
{
int i;
Cvar_RegisterVariable(&gl_mesh_drawrangeelements);
Cvar_RegisterVariable(&gl_mesh_testarrayelement);
Cvar_RegisterVariable(&gl_mesh_testmanualfeeding);
- R_RegisterModule("GL_Backend", gl_backend_start, gl_backend_shutdown, gl_backend_newmap);
-}
-void GL_SetupView_ViewPort (int x, int y, int width, int height)
-{
- if (!r_render.integer)
- return;
+ Cvar_RegisterVariable(&scr_zoomwindow);
+ Cvar_RegisterVariable(&scr_zoomwindow_viewsizex);
+ Cvar_RegisterVariable(&scr_zoomwindow_viewsizey);
+ Cvar_RegisterVariable(&scr_zoomwindow_fov);
- // y is weird beause OpenGL is bottom to top, we use top to bottom
- qglViewport(x, vid.realheight - (y + height), width, height);
- CHECKGLERROR
+ R_RegisterModule("GL_Backend", gl_backend_start, gl_backend_shutdown, gl_backend_newmap);
}
void GL_SetupView_Orientation_Identity (void)
}
}
+/*
+====================
+CalcFov
+====================
+*/
+float CalcFov (float fov_x, float width, float height)
+{
+ // calculate vision size and alter by aspect, then convert back to angle
+ return atan (height / (width / tan(fov_x/360*M_PI))) * 360 / M_PI;
+}
+
/*
==================
SCR_UpdateScreen
R_TimeReport("clear");
if (scr_conlines < vid.conheight && cls.signon == SIGNONS)
+ {
+ float size;
+ int contents;
+
+ // bound viewsize
+ if (scr_viewsize.value < 30)
+ Cvar_Set ("viewsize","30");
+ if (scr_viewsize.value > 120)
+ Cvar_Set ("viewsize","120");
+
+ // bound field of view
+ if (scr_fov.value < 1)
+ Cvar_Set ("fov","1");
+ if (scr_fov.value > 170)
+ Cvar_Set ("fov","170");
+
+ // intermission is always full screen
+ if (cl.intermission)
+ {
+ size = 1;
+ sb_lines = 0;
+ }
+ else
+ {
+ if (scr_viewsize.value >= 120)
+ sb_lines = 0; // no status bar at all
+ else if (scr_viewsize.value >= 110)
+ sb_lines = 24; // no inventory
+ else
+ sb_lines = 24+16+8;
+ size = scr_viewsize.value * (1.0 / 100.0);
+ size = min(size, 1);
+ }
+
+ r_refdef.width = vid.realwidth * size;
+ r_refdef.height = vid.realheight * size;
+ r_refdef.x = (vid.realwidth - r_refdef.width)/2;
+ r_refdef.y = (vid.realheight - r_refdef.height)/2;
+
+ // LordHavoc: viewzoom (zoom in for sniper rifles, etc)
+ r_refdef.fov_x = scr_fov.value * cl.viewzoom;
+ r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height);
+
+ if (cl.worldmodel)
+ {
+ Mod_CheckLoaded(cl.worldmodel);
+ contents = CL_PointSuperContents(r_vieworigin);
+ if (contents & SUPERCONTENTS_LIQUIDSMASK)
+ {
+ r_refdef.fov_x *= (sin(cl.time * 4.7) * 0.015 + 0.985);
+ r_refdef.fov_y *= (sin(cl.time * 3.0) * 0.015 + 0.985);
+ }
+ }
+
R_RenderView();
+ if (scr_zoomwindow.integer)
+ {
+ float sizex = bound(10, scr_zoomwindow_viewsizex.value, 100) / 100.0;
+ float sizey = bound(10, scr_zoomwindow_viewsizey.value, 100) / 100.0;
+ r_refdef.width = vid.realwidth * sizex;
+ r_refdef.height = vid.realheight * sizey;
+ r_refdef.x = (vid.realwidth - r_refdef.width)/2;
+ r_refdef.y = 0;
+ r_refdef.fov_x = scr_zoomwindow_fov.value;
+ r_refdef.fov_y = CalcFov(r_refdef.fov_x, r_refdef.width, r_refdef.height);
+
+ R_RenderView();
+ }
+ }
+
// draw 2D stuff
R_DrawQueue();
#define POLYGONELEMENTS_MAXPOINTS 258
extern int polygonelements[768];
-void GL_SetupView_ViewPort(int x, int y, int width, int height);
void GL_SetupView_Orientation_Identity(void);
void GL_SetupView_Orientation_FromEntity(matrix4x4_t *matrix);
void GL_SetupView_Mode_Perspective(double fovx, double fovy, double zNear, double zFar);
quadelements[pos++] = num + 3;
}
}
- GL_SetupView_ViewPort(vid.realx, vid.realy, vid.realwidth, vid.realheight);
+ qglViewport(0, 0, vid.realwidth, vid.realheight);
GL_SetupView_Mode_Ortho(0, 0, vid.conwidth, vid.conheight, -10, 100);
qglDepthFunc(GL_LEQUAL);
R_Mesh_Start();
float fog_density, fog_red, fog_green, fog_blue;
qboolean fogenabled;
qboolean oldgl_fogenable;
-void R_SetupFog(void)
+void R_UpdateFog(void)
{
if (gamemode == GAME_NEHAHRA)
{
R_RegisterModule("GL_Main", gl_main_start, gl_main_shutdown, gl_main_newmap);
}
-vec3_t r_farclip_origin;
-vec3_t r_farclip_direction;
-vec_t r_farclip_directiondist;
-vec_t r_farclip_meshfarclip;
-int r_farclip_directionbit0;
-int r_farclip_directionbit1;
-int r_farclip_directionbit2;
-
-// start a farclip measuring session
-void R_FarClip_Start(vec3_t origin, vec3_t direction, vec_t startfarclip)
-{
- VectorCopy(origin, r_farclip_origin);
- VectorCopy(direction, r_farclip_direction);
- r_farclip_directiondist = DotProduct(r_farclip_origin, r_farclip_direction);
- r_farclip_directionbit0 = r_farclip_direction[0] < 0;
- r_farclip_directionbit1 = r_farclip_direction[1] < 0;
- r_farclip_directionbit2 = r_farclip_direction[2] < 0;
- r_farclip_meshfarclip = r_farclip_directiondist + startfarclip;
-}
+static vec3_t r_farclip_origin;
+static vec3_t r_farclip_direction;
+static vec_t r_farclip_directiondist;
+static vec_t r_farclip_meshfarclip;
+static int r_farclip_directionbit0;
+static int r_farclip_directionbit1;
+static int r_farclip_directionbit2;
// enlarge farclip to accomodate box
-void R_FarClip_Box(vec3_t mins, vec3_t maxs)
+static void R_FarClip_Box(vec3_t mins, vec3_t maxs)
{
float d;
d = (r_farclip_directionbit0 ? mins[0] : maxs[0]) * r_farclip_direction[0]
}
// return farclip value
-float R_FarClip_Finish(void)
+static float R_FarClip(vec3_t origin, vec3_t direction, vec_t startfarclip)
{
+ int i;
+
+ VectorCopy(origin, r_farclip_origin);
+ VectorCopy(direction, r_farclip_direction);
+ r_farclip_directiondist = DotProduct(r_farclip_origin, r_farclip_direction);
+ r_farclip_directionbit0 = r_farclip_direction[0] < 0;
+ r_farclip_directionbit1 = r_farclip_direction[1] < 0;
+ r_farclip_directionbit2 = r_farclip_direction[2] < 0;
+ r_farclip_meshfarclip = r_farclip_directiondist + startfarclip;
+
+ if (cl.worldmodel)
+ R_FarClip_Box(cl.worldmodel->normalmins, cl.worldmodel->normalmaxs);
+ for (i = 0;i < r_refdef.numentities;i++)
+ R_FarClip_Box(r_refdef.entities[i]->mins, r_refdef.entities[i]->maxs);
+
return r_farclip_meshfarclip - r_farclip_directiondist;
}
Matrix4x4_CreateIdentity(&ent->matrix);
Matrix4x4_CreateIdentity(&ent->inversematrix);
- if (cl.worldmodel)
- R_FarClip_Box(cl.worldmodel->normalmins, cl.worldmodel->normalmaxs);
-
if (!r_drawentities.integer)
return;
if ((chase_active.integer || !(ent->flags & RENDER_EXTERIORMODEL))
&& !VIS_CullBox(ent->mins, ent->maxs)
&& (!envmap || !(ent->flags & (RENDER_VIEWMODEL | RENDER_EXTERIORMODEL))))
- {
ent->visframe = r_framecount;
- R_FarClip_Box(ent->mins, ent->maxs);
- }
}
}
if (visiblevolumes)
{
qglEnable(GL_CULL_FACE);
- qglDisable(GL_SCISSOR_TEST);
+ GL_Scissor(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height);
}
else
R_Shadow_Stage_End();
}
-static void R_SetFrustum (void)
+static void R_SetFrustum(void)
{
+ // break apart the viewentity matrix into vectors for various purposes
+ Matrix4x4_ToVectors(&r_refdef.viewentitymatrix, r_viewforward, r_viewleft, r_viewup, r_vieworigin);
+ VectorNegate(r_viewleft, r_viewright);
+
// LordHavoc: note to all quake engine coders, the special case for 90
// degrees assumed a square view (wrong), so I removed it, Quake2 has it
// disabled as well.
PlaneClassify(&frustum[3]);
}
-/*
-===============
-R_SetupFrame
-===============
-*/
-static void R_SetupFrame (void)
-{
-// don't allow cheats in multiplayer
- if (!cl.islocalgame)
- {
- if (r_fullbright.integer != 0)
- Cvar_Set ("r_fullbright", "0");
- if (r_ambient.value != 0)
- Cvar_Set ("r_ambient", "0");
- }
-
- r_framecount++;
-
- // break apart the viewentity matrix into vectors for various purposes
- Matrix4x4_ToVectors(&r_refdef.viewentitymatrix, r_viewforward, r_viewleft, r_viewup, r_vieworigin);
- VectorNegate(r_viewleft, r_viewright);
-
- GL_SetupView_ViewPort(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height);
-
- R_AnimateLight();
-}
-
-
static void R_BlendView(void)
{
rmeshstate_t m;
R_Mesh_Draw(3, 1, polygonelements);
}
+void R_UpdateWorld(void)
+{
+ if (!r_refdef.entities/* || !cl.worldmodel*/)
+ return; //Host_Error ("R_RenderView: NULL worldmodel");
+
+ if (r_shadow_realtime_world.integer && !gl_stencil)
+ {
+ Con_Printf("Realtime world lighting requires 32bit color; turning off r_shadow_realtime_world, please type vid_bitsperpixel 32;vid_restart and try again\n");
+ Cvar_SetValueQuick(&r_shadow_realtime_world, 0);
+ }
+
+ // don't allow cheats in multiplayer
+ if (!cl.islocalgame)
+ {
+ if (r_fullbright.integer != 0)
+ Cvar_Set ("r_fullbright", "0");
+ if (r_ambient.value != 0)
+ Cvar_Set ("r_ambient", "0");
+ }
+
+ R_Textures_Frame();
+ R_UpdateFog();
+ R_UpdateLights();
+}
+
+void R_RenderScene(void);
+
/*
================
R_RenderView
-
-r_refdef must be set before the first call
================
*/
-extern void R_DrawLightningBeams (void);
-void R_RenderView (void)
+void R_RenderView(void)
{
- entity_render_t *world;
if (!r_refdef.entities/* || !cl.worldmodel*/)
return; //Host_Error ("R_RenderView: NULL worldmodel");
+
+ r_refdef.width = bound(0, r_refdef.width, vid.realwidth);
+ r_refdef.height = bound(0, r_refdef.height, vid.realheight);
+ r_refdef.x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width);
+ r_refdef.y = bound(0, r_refdef.y, vid.realheight - r_refdef.height);
+ r_refdef.fov_x = bound(1, r_refdef.fov_x, 170);
+ r_refdef.fov_y = bound(1, r_refdef.fov_y, 170);
+
+ // GL is weird because it's bottom to top, r_refdef.y is top to bottom
+ qglViewport(r_refdef.x, vid.realheight - (r_refdef.y + r_refdef.height), r_refdef.width, r_refdef.height);
+ GL_Scissor(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height);
+ GL_ScissorTest(true);
+ R_ClearScreen();
- if (r_shadow_realtime_world.integer)
- {
- if (!gl_stencil)
- {
- Con_Printf("Realtime world lighting requires 32bit color turning off r_shadow_realtime_world, please type vid_bitsperpixel 32;vid_restart and try again\n");
- Cvar_SetValueQuick(&r_shadow_realtime_world, 0);
- }
- }
+ R_SetFrustum();
+ r_farclip = R_FarClip(r_vieworigin, r_viewforward, 768.0f) + 256.0f;
- world = &cl_entities[0].render;
+ if (gl_stencil && ((r_shadow_realtime_world.integer && r_shadow_worldshadows.integer) || ((r_shadow_realtime_world.integer || r_shadow_realtime_dlight.integer) && r_shadow_dlightshadows.integer)))
+ GL_SetupView_Mode_PerspectiveInfiniteFarClip(r_refdef.fov_x, r_refdef.fov_y, 1.0f);
+ else
+ GL_SetupView_Mode_Perspective(r_refdef.fov_x, r_refdef.fov_y, 1.0f, r_farclip);
- // FIXME: move to client
- R_MoveExplosions();
- R_TimeReport("mexplosion");
+ GL_SetupView_Orientation_FromEntity(&r_refdef.viewentitymatrix);
+ R_TimeReport("setup");
- qglPolygonOffset(0, 0);
- qglEnable(GL_POLYGON_OFFSET_FILL);
+ R_RenderScene();
+
+ R_BlendView();
+ R_TimeReport("blendview");
+
+ GL_Scissor(0, 0, vid.realwidth, vid.realheight);
+ GL_ScissorTest(false);
+}
+
+extern void R_DrawLightningBeams (void);
+void R_RenderScene(void)
+{
+ entity_render_t *world;
+
+ // don't let sound skip if going slow
+ if (!intimerefresh && !r_speeds.integer)
+ S_ExtraUpdate ();
+
+ r_framecount++;
- R_Textures_Frame();
- R_SetupFrame();
- R_SetFrustum();
- R_SetupFog();
R_SkyStartFrame();
- R_BuildLightList();
- R_TimeReport("setup");
if (cl.worldmodel && cl.worldmodel->brush.FatPVS)
cl.worldmodel->brush.FatPVS(cl.worldmodel, r_vieworigin, 2, r_pvsbits, sizeof(r_pvsbits));
-
+ world = &cl_entities[0].render;
R_WorldVisibility(world);
R_TimeReport("worldvis");
- R_FarClip_Start(r_vieworigin, r_viewforward, 768.0f);
R_MarkEntities();
- r_farclip = R_FarClip_Finish() + 256.0f;
- if (gl_stencil && ((r_shadow_realtime_world.integer && r_shadow_worldshadows.integer) || ((r_shadow_realtime_world.integer || r_shadow_realtime_dlight.integer) && r_shadow_dlightshadows.integer)))
- GL_SetupView_Mode_PerspectiveInfiniteFarClip(r_refdef.fov_x, r_refdef.fov_y, 1.0f);
- else
- GL_SetupView_Mode_Perspective(r_refdef.fov_x, r_refdef.fov_y, 1.0f, r_farclip);
- GL_SetupView_Orientation_FromEntity(&r_refdef.viewentitymatrix);
R_TimeReport("markentity");
qglDepthFunc(GL_LEQUAL);
+ qglPolygonOffset(0, 0);
+ qglEnable(GL_POLYGON_OFFSET_FILL);
R_Mesh_Start();
R_MeshQueue_BeginScene();
R_Shadow_UpdateWorldLightSelection();
+ // don't let sound skip if going slow
+ if (!intimerefresh && !r_speeds.integer)
+ S_ExtraUpdate ();
+
if (R_DrawBrushModelsSky())
R_TimeReport("bmodelsky");
R_DrawModels();
R_TimeReport("models");
+ // don't let sound skip if going slow
+ if (!intimerefresh && !r_speeds.integer)
+ S_ExtraUpdate ();
+
R_ShadowVolumeLighting(false);
R_TimeReport("rtlights");
+ // don't let sound skip if going slow
+ if (!intimerefresh && !r_speeds.integer)
+ S_ExtraUpdate ();
+
R_DrawLightningBeams();
R_TimeReport("lightning");
R_DrawWorldCrosshair();
R_TimeReport("crosshair");
- R_BlendView();
- R_TimeReport("blendview");
-
R_MeshQueue_Render();
R_MeshQueue_EndScene();
qglPolygonOffset(0, 0);
qglDisable(GL_POLYGON_OFFSET_FILL);
+
+ // don't let sound skip if going slow
+ if (!intimerefresh && !r_speeds.integer)
+ S_ExtraUpdate ();
}
/*
if (host_speeds.integer)
time1 = Sys_DoubleTime();
+ R_UpdateWorld();
CL_UpdateScreen();
if (host_speeds.integer)
/*
==================
-R_AnimateLight
+R_UpdateLights
==================
*/
-void R_AnimateLight (void)
+void R_UpdateLights(void)
{
int i, j, k;
+ dlight_t *cd;
+ rdlight_t *rd;
-//
// light animations
// 'm' is normal light, 'a' is no light, 'z' is double bright
i = (int)(cl.time * 10);
k = k*22;
d_lightstylevalue[j] = k;
}
-}
-
-
-void R_BuildLightList(void)
-{
- int i;
- dlight_t *cd;
- rdlight_t *rd;
r_numdlights = 0;
c_dlights = 0;
extern int r_numdlights;
extern rdlight_t r_dlight[MAX_DLIGHTS];
-void R_BuildLightList(void);
-void R_AnimateLight(void);
+void R_UpdateLights(void);
void R_MarkLights(entity_render_t *ent);
void R_DrawCoronas(void);
void R_CompleteLightPoint(vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal, const vec3_t p, int dynamic, const mleaf_t *leaf);
R_Mesh_State_Texture(&m);
GL_Color(0, 0, 0, 1);
qglCullFace(GL_FRONT); // quake is backwards, this culls back faces
- qglDisable(GL_SCISSOR_TEST);
+ GL_Scissor(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height);
r_shadowstage = SHADOWSTAGE_NONE;
c_rt_lights = c_rt_clears = c_rt_scissored = 0;
//qglDisable(GL_POLYGON_OFFSET_FILL);
GL_Color(1, 1, 1, 1);
qglColorMask(1, 1, 1, 1);
- qglDisable(GL_SCISSOR_TEST);
+ GL_Scissor(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height);
qglDepthFunc(GL_LEQUAL);
qglCullFace(GL_FRONT); // quake is backwards, this culls back faces
qglDisable(GL_STENCIL_TEST);
// (?!? seems like a driver bug) so abort if gl_stencil is false
if (!gl_stencil || BoxesOverlap(r_vieworigin, r_vieworigin, mins, maxs))
{
- qglDisable(GL_SCISSOR_TEST);
+ GL_Scissor(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height);
return false;
}
for (i = 0;i < 3;i++)
if (ix2 <= ix1 || iy2 <= iy1)
return true;
// set up the scissor rectangle
- qglScissor(ix1, iy1, ix2 - ix1, iy2 - iy1);
- qglEnable(GL_SCISSOR_TEST);
+ GL_Scissor(ix1, iy1, ix2 - ix1, iy2 - iy1);
+ //qglScissor(ix1, iy1, ix2 - ix1, iy2 - iy1);
+ //qglEnable(GL_SCISSOR_TEST);
c_rt_scissored++;
return false;
}
extern cvar_t r_dynamic;
extern cvar_t r_drawcollisionbrushes;
-void R_Init (void);
-void R_RenderView (void); // must set r_refdef first
+void R_Init(void);
+void R_UpdateWorld(void); // needs no r_refdef
+void R_RenderView(void); // must call R_UpdateWorld and set r_refdef first
void R_InitSky (qbyte *src, int bytesperpixel); // called at level load
#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_vieworigin[0])*((v)[0] - r_vieworigin[0])+((v)[1] - r_vieworigin[1])*((v)[1] - r_vieworigin[1])+((v)[2] - r_vieworigin[2])*((v)[2] - r_vieworigin[2])))))
#define calcfogbyte(v) ((qbyte) (bound(0, ((int) ((float) (calcfog((v)) * 255.0f))), 255)))
-// start a farclip measuring session
-void R_FarClip_Start(vec3_t origin, vec3_t direction, vec_t startfarclip);
-// enlarge farclip to accomodate box
-void R_FarClip_Box(vec3_t mins, vec3_t maxs);
-// return farclip value
-float R_FarClip_Finish(void);
-
-// updates farclip distance so it is large enough for the specified box
-// (*important*)
-void R_Mesh_EnlargeFarClipBBox(vec3_t mins, vec3_t maxs);
-
#include "r_modules.h"
#include "meshqueue.h"
extern qboolean scr_skipupdate;
extern cvar_t scr_viewsize;
+extern cvar_t scr_fov;
extern cvar_t showfps;
extern cvar_t crosshair;
-n darkplaces: segfault reading memory in windows when starting a new server from menu (yummyluv)
-n darkplaces: server is starting before the "port" cvar is set by commandline and scripts? (yummyluv)
-n darkplaces: typing ip in join game menu should show 'trying' and 'no response' after a while, or 'no network' if networking is not initialized (yummyluv)
+d darkplaces: added silly scr_zoomwindow as an experiment, turned out mostly useless
+0 dpmod: revert back to id1 weapons
-n dpmod: make grapple off-hand (joe hill)
d darkplaces: change cl_fakelocalping_min and _max to only lag by half each way, as currently it results in 2x ping
d darkplaces: make MAX_PACKETFRAGMENT a property of each net connection, so memory loopbacks could use huge limits (Sajt)