lordhavoc [Sat, 19 Jan 2002 21:36:53 +0000 (21:36 +0000)]
rearranged error checking during portal building so it will only Host_Error when an error occurs, and changed tempmempool allocations for portal processing to use the loadmodel mempool so portals can be freed after an error (using modelflush)
lordhavoc [Fri, 18 Jan 2002 20:33:38 +0000 (20:33 +0000)]
cleaned up a lot of particle rendering properties (mainly related to rain code), rain looks nice now.
added depthdisable to rmeshinfo_t
gl_backend now uses glDrawRangeElements on non-win32 (need to use dynamic GL binding to get it on win32), nice speedup
rearranged r_speeds2 time reporting code, now times more things (in gl_screen.c especially)
lordhavoc [Thu, 17 Jan 2002 01:09:28 +0000 (01:09 +0000)]
removed (experimental, and broken) particles with polygonal explosion (after some testing I found it looked lousy)
fixed particles disappearing when using slowmo 0
lordhavoc [Wed, 16 Jan 2002 19:08:04 +0000 (19:08 +0000)]
hushed unitialized warning on end in cl_particles.c when using MSVC
fixed direct use of glActiveTextureARB/glClientActiveTextureARB
type cast parameters to glDepthMask
lordhavoc [Wed, 16 Jan 2002 06:16:58 +0000 (06:16 +0000)]
rewrote memory system entirely (hunk, cache, and zone are gone, memory pools replaced them all)
models can be reloaded at any time (Mod_CheckLoaded, etc)
entire renderer can be restarted using r_restart command
batch triangle mesh rendering system (gl_backend.c)
most rendering code does not touch GL anymore
gl_textures now supports procedural textures, and fragment textures (small textures combined into larger images)
lightmaps can now be mipmapped (r_miplightmaps)
broke up r_part.c and r_decals.c into cl_particles.c, r_particles.c, cl_decals.c, and r_decals.c to improve renderer/client separation, but explosions are still renderer
moved CL_NextDemo from cl_main.c to cl_demo.c
cleaned up demo stop/disconnect code
removed render modules stuff from all cl_ files
renderer uses separate light array, and recalculates radius for lights based on color, and calculates subtract value to give it a soft edge at the radius perimeter
small surfaces do not use lightmaps (unfortunately they still look slightly different in dynamic lighting)
items can now bob according to cl_itembob* cvars
moved CL_SignonReply from cl_main.c to cl_parse.c
monster movement interpolation is now done clientside instead of serverside, Nehahra movie should look better now
cvars now have a .integer field containing the integer value of their string (nearly all .value accesses have been changed to .integer for speed reasons)
pmodel is now only available in Nehahra mode (pmodel was a bad hack)
r_farclip cvar removed, farclip now dynamically adjusts to level as you explore it
parsing of wad names out of HL maps is now in renderer code
changed isworldmodel stuff in model loading
cleaned up CL_ParseUpdate a bit (related to clientside monster interpolation)
renamed r_glowinglightning to cl_glowinglightning
moved FindNonSolidLocation to bmodel code
lightning beam models are now only looked up once
entity_t now contains an entity_persistent_t which holds data persistent from frame to frame (interpolation mainly), entity_render_t is wiped every frame
marked a lot more things as static
increased command buffer (script execution buffer) from 8k to 32k
COM_LoadMallocFile has been renamed to COM_LoadFile, and all other variants are gone
rounding on MSG_Read/Write stuff has been changed to fix negative rounding (C rounds toward zero, old code assumed it always rounded down)
improved cachepic (menu images) system to load from wad
statusbar now uses cachepic system
cachepics are cleared when renderer is restarted
fixed fog on transparent objects, should always look correct now
moved R_TimeRefresh_f from gl_rmisc.c to gl_rmain.c
moved R_NewMap from gl_rmisc.c to gl_rmain.c
deleted gl_rmisc.c
removed support for glfog
masked sky rendering is now done by first rendering the sky scene, clearing the depthbuffer, rendering invisible depth polys over it, then rendering the scene, this is for more flexibility
C-code based shader system (not scripted)
deleted hcompress.c
due to more thorough memory corruption detection, a (harmless with old zone system) buffer overflow bug in the client name command was fixed
untested (and quite possibly broken) quaternion math stuff added to mathlib.h
removed support for colormod entity effect (massive mess to support it everywhere)
improved QC PR_RunError reports
moved QC opcode execution loop into pr_execprogram.h, included multiple times
fairly major sbar cleanup
rearranged GL extension detection again
added EXT_texture_env_combine support
knghtbrd [Mon, 17 Dec 2001 08:25:27 +0000 (08:25 +0000)]
-safe now does something approximately close to correct. Not a full fix
for what it does and doesn't do, but this will suffice for now. Added the
-nomouse flag to GLX. Debugging is a bitch without it, really. Also made
a few minor changes for gcc v3 building. I'm not through with makefile
yet, though.
lordhavoc [Tue, 4 Dec 2001 13:28:29 +0000 (13:28 +0000)]
rewrote RecursiveHullCheck, no longer gets stuck on angle changes, and is generally more correct all the time (no longer uses PointContents checks either)
added content value to RecursiveHullCheck and TraceLine, they can now treat any content change as an impact
TraceLine now can take NULL impact and normal if they are not desired
TraceLine now sets trace_endcontents to the impacted content value
rewrote nehahra/rogue/hipnotic/standard_quake variables to be gamemode (GAME_NORMAL, GAME_HIPNOTIC, GAME_ROGUE, GAME_NEHAHRA, etc)
unfinished code for directional static lighting on models (CL_ParseEntityLump)
game now uses current mode as title everywhere (window title, server title, etc), so it would say 'DarkPlaces-Hipnotic' for example
added Draw_AdditiveString variant of Draw_String, switchs to additive blending and back to alpha afterward
engineversion string is now generated in sys_shared
major rewrite of transpolyrender, now uses glDrawElements (with batching of same texture/mode) and array locking
transpolyparticle added to quickly add particles to transpoly list (30% or so savings)
split wallpolyrender into two pieces, first renders walls, second renders fog over them, decals are rendered between the two, so decals are now fogged
added field of vision distortion when underwater (in MYgluPerspective)
changed gl_lightmapalign to align to the specified byte boundary instead of pixel boundary, and removed NVIDIA mentions (it is not their problem, it is a matter of the texture unpack alignment, but I stuck with 4 byte alignment because it is likely faster for most people)
fixed animating textures
rearranged a little bmodel code (probably no effect)
got rid of r_solidworldnode and r_pvsworldnode cvars (only the fastest choices are available now)
screenshots are now corrected to match lighthalf if it is being done using hardware gamma
removed some old unused cruft from host.c
added RGB gamma correction code to image.c
added VectorRandom to mathlib.h
model skins are no longer mipmapped by default (r_mipskins 0, but this is saved in configs so most people might not notice) because quake skins were not designed for it, and it is a 25% texture memory use increase on model skins
removed old unused Mod_FloodFillSkin code
transparent textures no longer clip other geometry in the hidden surface removal (ouch this was a bug)
maps should be able to use engine fields without the mod knowing about them now (alpha, etc), engine fields are appended to the list of progs fields
particle and decal textures are now all stored in one 'particle font' texture, for a rather hefty speed gain (no texture switchs)
all particles are now alpha blended (additive wasn't necessary on them, but is still available), to kill off state changes
new splash effect from raindrops
added a few bithacking float optimizations here and there (most with alternates if you define SLOWMATH)
new explosion effect (on by default, but a major speed drain, turn off with r_particles_explosions 0)
particle textures are now all in one image (a 'particle font'), massive speed gains with mixed particle types
all particles are alpha blend now (additive still supported, just not used), for more speed gains
particles now use 24bit RGB colors, rather than palette colors (the quake palette has been included however, because many particles still use it)
a lot of old cruft has been removed from r_part
ui items can now be strings rather than pics (actually they can be both, but I have not found a real use for this, perhaps a second draw location needs to be added for the string, so a button could have a label centered on it)
unfinished X11 gamma ramp support (need to allocate colors before setting them, haven't figured this out yet)
changed pitch range in GLX to let you look straight up and down, like in wgl version
mostly redesigned animation interpolation management code (R_LerpUpdate is now CL_LerpUpdate and performed on all network entities, R_LerpAnimation has been tweaked to not crash on bmodels and is now automatically used on all visible entities in the renderer, lerping info has has been split out of entity_render_t into entity_persistent_t so that entity_render_t contains no persistent data)
renderer now only uses entity_render_t structures
renderer now uses only currentrenderentity, and rarely passes individual properties around
cleaned out some old global variables relating to rendering
moved most of glquake.h to render.h
envmap is now actually a vaguely useful command (renders cubic environment map images of the current scene, changed to write tga images rather than raw rgba, and take a basename to use, and name them like skyboxes expect, and place them in the env directory)
many things that should be private to a particular file have been marked static
models now contain a SERAddEntity function (to add themselves to the SER clipping list to verify visibility)
models now contain DrawEarly and DrawLate functions (to render before and after wallpoly/decals/skypoly/etc, respectively)
dlight management functions moved out of cl_main and into cl_light
rewrote RelinkStaticEntities (does the same, just cleaner)
renamed RelinkEntities to RelinkNetworkEntities, split out LerpPlayerVelocity, and made a RelinkEntities function which calls the various functions
rewrote or altered portions of RelinkNetworkEntities relating to origin
muzzleflash lights are now clipped to keep them out of walls
fixed up code relating to vid.conwidth/height and vid.width/height (which is now gone, converted to vid.conwidth/height) and renamed glx/gly/glwidth/glheight to vid.realx/y/width/height (updated each frame using GL_BeginRendering)
rewrote most (all?) code relating to r_refdef, it is now always recalculated as well
dynamic lights will only update a lightmap if they actually alter it (optimization)
models now have 3 bounding boxes, used depending on angles (normal, yaw rotation only, and full rotation)
bmodel bounding boxes are recalculated from vertices
server now uses model bounding box instead of entity bounding box for visibility testing (since entity bounding box is often smaller)
server no longer portal-visibility checks entities because it was FAR too slow (sv_vischeckentities is still available though)
gl_rsurf code now relies on there being a currentrenderentity (even if it is cl.worldent.render), R_SetupWorldEnt added to avoid duplicate code for this
engine no longer has a version number, only build number
makefile now uses buildnum (as was originally intended) to increment build number every time it is compiled, build numbers will be rising rapidly from now on
timedemos will now force up console instantly
rocket trails are more dense
renamed VectorMA (function) to VectorMASlow, renamed VectorMAQuick (#define) to VectorMA, don't know why I had changed it before, had already cleaned up the parameter issues where it is used
converted most of lighting in decal code to integer
added support for all sprite types (untested)
lordhavoc [Fri, 2 Nov 2001 12:45:53 +0000 (12:45 +0000)]
two-layer sky rendering now uses GL_ARB_texture_env_combine if available to render both layers in one pass (nice speedup), and sky rendering code has been simplified a little, also optimized the per vertex direction calculations to use RSqrt code instead of normal 1/sqrt
lordhavoc [Fri, 2 Nov 2001 11:02:38 +0000 (11:02 +0000)]
removed support for GL_SGIS_multitexture (ancient)
redesigned entire extension setup system (now resides only in vid_shared.c)
all extension functions are checked against NULL before the extension is enabled (if one is NULL it complains appropriately)
now also looks for glClientActiveTextureARB (needed for multitexture in vertex arrays)
lordhavoc [Mon, 29 Oct 2001 07:23:10 +0000 (07:23 +0000)]
got rid of leafnums array in edict structure for pvs checking, pvs is now checked based on predicted locations of entities, and some reorganizational optimizations of WriteEntitiestoClient
changed an SV_Move call to use the proper MOVE_ define (no behavior change, only cleanup)
lordhavoc [Mon, 29 Oct 2001 07:16:35 +0000 (07:16 +0000)]
moved Sys_Printf and related code/data to sys_shared.c (new), removed all uses of isDedicated (replaced with cls.state == ca_dedicated), timestamps should work on all targets now, and made some minor whitespace changes
lordhavoc [Mon, 29 Oct 2001 06:43:57 +0000 (06:43 +0000)]
fixed input reading code bug in dedicated servers (clients are not kicked off immediately on connecting now... clearly an important fix)
minor whitespace changes
and changed a SV_Move call to use MOVE_NOMONSTERS instead of 1, no effect on code behavior
lordhavoc [Mon, 29 Oct 2001 06:37:10 +0000 (06:37 +0000)]
changed SV_Move calls to always use the correct MOVE_ defines in the type parameter (true or false were often passed, due to a legacy of it being simply 'nomonsters', apparently during quake's development), no code change, just cleanup
lordhavoc [Mon, 29 Oct 2001 06:30:27 +0000 (06:30 +0000)]
moved ixtable definition and initialization code to mathlib (and added Mathlib_Init call to common.c), fixes bugs in dedicated server (previously ixtable was being initialized in the renderer)
lordhavoc [Mon, 29 Oct 2001 06:27:54 +0000 (06:27 +0000)]
changed way that "entities" (CL_PrintEntities_f) displays entities, and now skips inactive entities (forgot to update it's code a long time ago, apparently)
lordhavoc [Sun, 28 Oct 2001 09:18:01 +0000 (09:18 +0000)]
made the Sorted Edge Rasterizer (hidden surface removal) optional as the r_ser cvar, can be a speed difference
added back the old portal-passage worldnode code (sometimes faster)
recalculate node bounding boxes when loading (based on leaf bounding boxes which are calculated from portal generation)
added untested code for qftol (much faster double to integer conversion on x86, not used yet)
added a couple Hunk_Check calls while loading things (just to be a little more paranoid)
minor whitespace cleanup, some commented out code removed
lordhavoc [Fri, 26 Oct 2001 20:17:33 +0000 (20:17 +0000)]
added CVAR_SAVE and CVAR_NOTIFY flags to cvar_t structure (at the beginning), updated all cvar definitions to match, a lot more cvars are saved now.\nadded server-side portal checking of entity visibility, only entities which really are visible are sent to clients now (some slowdown on server, but reduces network traffic and makes wallhacks useless)\nadded mostly untested mouse and keyboard user interface code (input support not completely finished yet, and no code using the UI yet)\n
lordhavoc [Thu, 18 Oct 2001 00:59:02 +0000 (00:59 +0000)]
probable fix for severe model rendering bugs in 3DFX voodoo4/5 win32 drivers, and G400 win32 drivers (they don't seem to handle a sizeof == 0 case for the array pointer stepping)
very nice command line tab completeion from Shawn Walker
<eviltypeguy@qeradiant.com> with my later modifications so that commands
are completed as much as possible.
lordhavoc [Sun, 10 Jun 2001 20:03:42 +0000 (20:03 +0000)]
added -lz to the non-ALSA compile line, switched to non-ALSA compile by default (to match the sound driver default being non-ALSA)
added a lot of descriptive comments