major speedup to alias model fake shadow rendering
now traces in direction of light instead of straight down, this causes a shadow to be cast on a wall in some cases (desirable)
disabled smoke from explosions, it was a minor effect and used too much fillrate
added fractalnoise to the WORKINGLQUAKE section at the top, and fixed an oldtime reference in WORKINGLQUAKE code
map and load commands are now delayed until the video system is started, this fixes crashs caused by the video system starting after the configs are read
CL_TraceLine can now return what entity was hit (this isn't actually used, and accounts for most of the changed files)
r_shadows returns, currently only supported on alias models (they are the only ones with a DrawFakeShadow function)
added Matrix4x4_Transform3x3
stencil is now supported (optional, off by default, use vid_stencil to enable)
vid_ cvars are updated when VID_Mode succeeds
GL stencil functions enabled
added Mod_FindTriangleWithEdge and Mod_BuildTriangleNeighbors functions (not used by anything)
added Mod_LoadModels function, which is called when renderer is restarted or "modelflush" is used, it reloads all models that are used
this commit adds video mode switching, and preferred mode is saved to config, no more need for -window/-width/-height/-bpp (they still work)
IN_Init and IN_Shutdown code has been merged into VID_InitMode and VID_Shutdown code in each of the video systems
VID_InitCvars renamed to VID_Shared_Init
VID_Open and VID_Close functions added in vid_shared, Host_Init now calls VID_Open
S_Open/Close and CDAudio_Open/Close added (none of these do anything yet)
VID_Open and VID_Close call R_Modules_Start, S_Open, and CDAudio_Open and their corresponding Close functions
VID_Restart_f added (vid_restart command)
vid_hidden now starts true (to avoid any refreshs until video is started)
vid_fullscreen/width/height/bitsperpixel are now saved to config
VID_Open is called after configs are parsed
Render_Init now longer starts/stops modules
IN_MouseEvent in vid_wgl.c no longer clamps pitch (since that's done by IN_PostMove)
Thanks to Elric for adding dpmaster support!
slist command renamed to net_slist, net_inetslist command added
"heartbeat" command notifies master server(s) of your server's presence (this is automatic, but you can force a heartbeat)
sv_master1 through sv_master4 cvars contain master server addresses, they all default to "" (none), this may change if someone hosts a darkplaces master server and wants it added to the defaults... (note: these cvars ARE saved to config)
com_modname contains the currently running mod directory name (for example id1, darkplaces, transfusion, etc)
some Con_DPrintf's have been added to the server query code, so if you want to know if people are checking out your server, it should tell you about it now (I think?)
some Con_DPrintf's exist in the inetslist code so you can watch the packet flow
static crosshair is now drawn during sbar stage (where it should be), fixes the bug where it appeared infront of the menus
world crosshair size is now constant on the screen
rearranged code greatly
it just works better, ok?
now pretends gfx.wad pics are in the gfx/ directory, this changes the override path for gfx.wad pics (statusbar images in other words) to be for example gfx/blah.tga, however the old override path (no prepended gfx/) is still supported for compatibility with previous versions (mainly just for sake of conchars and conback)
Sbar_Init now called from Render_Init instead of Host_Init (it was being called before the texture system was started...)
Sbar_Init now registers an sbar module, with corresponding start/shutdown/newmap functions, so when the renderer is restarted, the pics are precached again
wglGetExtensionsString is properly detected now (was checking for an extension string, but none is present outside the wgl extensions list, which is a chicken and egg problem, now just checks if the function exists, like the spec says to do)
almost completely rewrote vid_wgl's mode code, there is no modelist of any kind anymore
vid_wgl works again
VID_Init renamed to VID_InitMode, it returns false if it was unsuccessful
VID_Mode added, which prints mode change message to console and passes on to VID_InitMode
shuffled cl_light and some of cl_tent into cl_main and remaining cl_tent code into cl_parse
got rid of bitprofile console command because it only worked for old protocol (probably should add it back for new protocol though)
colors for DrawQ_Mesh are now float rather than byte, and vertices are padded to 4 floats per vertex
R_DrawQueue conversion to R_Mesh is getting closer to done
m.wantoverbright is gone
done manually by the few things that wanted it (tweaking the texrgbscale in other words, and their own local colorscale variables)
mesh_colorscale renamed to r_colorscale, and now available throughout rendering (no need to wait for the results of R_Mesh_State before scaling your colors)
lightscalebit renamed to r_lightmapscalebit
lightscale is gone (wasn't used)
msurface_t cached_lightscalebit renamed accordingly to cached_lightmapscalebit
starting work on converting the 2D system to use R_Mesh calls
integer dlight code is now 32bit (instead of 64bit)
stain creation code is now floating point
stain creation code is now linear falloff instead of 1/(x*x), to make stains more consistent with respect to radius (their center density is exactly known)
GL_SetupView_* functions added, they replace most of R_Mesh_Start's functionality (it still exists and does the remaining things), GL_SetupView_* functions should be used for setting up a view (obviously) for rendering, view orientation and perspective and all that...
got rid of gl_mesh_drawmode, now only gl_mesh_drawrangeelements remains, this got rid of support for non-vertex-array rendering, also now c_meshs and c_meshtris are counted by GL_DrawRangeElements (c_meshtris was renamed to c_meshelements)
varray_element is gone, instead you pass your own element array to R_Mesh_Draw
this got a 3.5% speed gain in cavetest2bench
also, R_Mesh_ResizeCheck now takes only a numverts parameter, since numtriangles was only used for the varray_element array
manually inlined GL_LockArray and GL_UnlockArray in the only places they were used
RGB fragment textures are no longer aligned on 3 pixel boundaries, changed UNPACK_ALIGNMENT to allow this
VID_Init now takes mode settings (fullscreen, width, height)
commandline options like -window and -width are now parsed by vid_shared code
vid_width, vid_height, and vid_bitsperpixel cvars added, vid_mode removed
VID_CompareMode added, for simpler mode matching (returns a double, smaller value is better match)
GL_OpenLibrary takes a library name to load
GL_OpenLibrary, GL_CloseLibrary, and GL_GetProcAddress have been moved to platform specific vid_ files (wgl and glx)
gl_platform added (example values: "WGL", "GLX")
gl_platformextensions added (containing any extensions reported by platform specific strings)
gl_checkextension renamed to GL_CheckExtension for consistency
glXQueryExtensionsString and glXGetProcAddressARB support
looks up GLX_SGI_video_sync extension
removed halfscreen hack from vid_wgl (the code that tried to identify dual monitor configurations and use only one of them)
BoxOnPlaneSideFunc code - gone, replaced by BoxOnPlaneSide
BOX_ON_PLANE_SIDE macro - gone, no replacement necessary (use BoxOnPlaneSide)
R_CullBox and R_CulledBox macros have been replaced by optimized functions
this gets a minor speed gain overall
optimizing R_DrawSurfaces and WorldNode functions
visframe and pvsframe are now arrays rather than part of the surface struct, resulting in less cache misses
surfaces are now texture sorted rather than shader sorted, OpaqueWall renderers have been reorganized to minimize state checks, which offers a minor speedup
r_vertexsurfacesthreshold is gone, no longer supported...
expanded console buffer from 16k to 128k, and changed scroll amount to be dependent on visible console height (scrolls half the visible area instead of just 2 lines)
svs.clients is now allocated dynamically according to svs.maxclients, and there is now a function for updating svs.maxclients called SV_SetMaxClients
this cuts the memory usage in singleplayer by 17mb
transform matrix is now separate from R_Mesh_State, a new function called R_Mesh_Matrix takes up the task of changing transforms, and is used a lot less frequently in the engine than R_Mesh_State, this gets a nice speed gain in cavetest2
vertex arrays renamed to varray_ and exposed to rest of engine
mesh_maxtris and mesh_maxverts exposed (really only intended for R_Mesh_ResizeCheck #define)
R_Mesh_GetBuffer is gone, R_Mesh_State takes it's place for most of it's functionality
R_Mesh_ResizeCheck (a #define) will expand arrays on the fly if a mesh is too big (note: be sure to use this if you have a mesh that may be more than 1024 triangles, 3072 verts)
R_Mesh_Draw takes the place of R_Mesh_Render and takes two parameters (number of verts and number of triangles)
fixed bug that caused sky to appear through models when sky was onscreen (R_DrawWorld must be called at a specific point in rendering, had forgotten that)