added prvm_printfunction command which prints an assembly dump of the specified qc function, with coloring and optionally statement profiling to show how many times each statement has been executed (prvm_statementprofiling must be on for this), also heavily modified statement printing to be more readable
significant optimizations to the progs interpreter, changed the runaway loop counter to only count jump instructions (if/ifnot/goto), and redesigned the profile counting to use pointer math on batches of instructions instead of counting each instruction individually
changed prvm_profile report to show callcount before statements and builtincost, changed the sorting order to use summed callcount+statements+builtincost (and this made it print call counts for builtin functions as well)
reenabled the 'stick in place if stuck in a solid' code, but changed it to only apply for bmodelstartsolid, this prevents monsters from falling out of the level even if they're stuck in a wall, for consistency with stock quake
changed particle trail handling so that the TE_TEI_G3 effect can spawn particles along the beam just like trails can
cleaned up particle texture generation, no longer generates them if loading from disk, now also allows all 64 slots to be used (except the beam one) by generating generic texcoords for all of them
replaced rainsplash animation with just a single particle which expands over time to free up significant space in the particlefont (also added sizeincrease parameter support to effectinfo.txt accordingly)
renamed scr_screenshot_gamma to scr_screenshot_gammaboost and changed default to 1, this means all screenshots will be unmodified unless the user specifically changes the setting, rather than saving them very bright by default
optimized LoadTGA to have fast paths for all formats, rather than one unified loading loop that tried to support all formats, this saves 1.15 seconds of load time in nexuiz on my machine (before: 2.32 seconds spent in LoadTGA, after: 1.17 seconds)
removed the flawed detection of modelspace deluxemaps (it was always concluding they were modelspace because of unused black pixels and such), now assumes q3bsp deluxemaps are always modelspace
reworked most of q3bsp q3 shader loading, now supports more shader effects (the first layer's blendfunc is now used for rendering), still no multilayer stuff though, and still no tcgen environment so some surfaces now look worse because their first pass is an environment effect, but most others look better...
q3 fog shaders are usually invisible now (looks better than blinding white surfaces)
added support for more hacky q3 shaders (like sky shaders that don't have surfaceparm sky, and transparent shaders that don't have surfaceparm trans)
added support for alpha test in q3 shaders (improves some shaders)
rewrote timing code, now a much better and very different sleeping method, no longer wastes any cpu time
changed timing code to have independent sleeping for client and server frames in a listen server
changed console execution to occur in sync with server frames if a server is running, this fixes frikbot loading of .way files
eliminated several host_* variables, replaced host_realframetime with cl.realframetime (which is how long since the last client frame)
removed the clamping of sys_ticrate to >= 0.1, so now sys_ticrate 0 is allowed (run as fast as possible), as well as silly values like 0.001
removed serverprofile cvar as it was not easy to preserve it in the rewritten timing
merged Host_FilterTime, Host_ServerFrame, Host_Frame, _Host_Frame into Host_Main (which also calls Host_Init), this eliminates some duplicate code in all the sys_ modules
batch by lightmap as well as texture, this cures problems with vertex lit surfaces in deluxemapped q3bsp files (the vertex lit surfaces can't be deluxemapped)
changed where vertex coloring is applied in the fragment shader, this fixes problems with vertex colored surfaces (note: does not help deluxemapping mode, there is another bug affecting that)
modified Mod_BuildTextureVectorsAndNormals to become Mod_BuildTextureVectorsFromNormals, this is in preparation for properly honoring the surface normals in models and maps (doesn't do anything yet)
eliminated rmeshstate_t .pointer_vertex and .pointer_color (now must use R_Mesh_VertexPointer and R_Mesh_ColorPointer instead - in a lot of code these don't need to be called as often)
renamed R_Mesh_State to R_Mesh_TextureState
made an alternate variant of R_Mesh_TextureState called R_Mesh_ResetTextureState which acts like it was given an empty rmeshstate_t (but is faster than R_Mesh_TextureState)
moved R_Mesh_VertexPointer and R_Mesh_TexCoordPointer calls out of the inner loops of the GLSL surface path
other related cleanups
redesigned some of the model animation code, should be a speed gain (no longer processes animation multiple times on models with multiple textures), and executes less code per surface (should speed up map rendering)
AGL fixes: fixed a crash when switching to and from fullscreen several times; explicitely release the display when closing the video module; fixed initial test in VID_Shutdown(); a bit of code cleaning
prints entity number of MOVETYPE_PUSH entities without models (this is mostly useful to level designers who accidentally left a brushless door lying around)
fixed really stupid typo in CL_TraceBox regarding bmodel entity collisions (doors and such) which was breaking their collisions
eliminated CL_PointQ1Contents
made darkplaces able to compile as C++ again, and fixed all conversion warnings when doing so
changed several malloc and free calls to Z_Malloc and Z_Free
added some extra prints to net_slistqw to figure out which masters are working, and removed a few duplicate references to the id qw masters from the list
some cleanup of the GLSL shader, no longer uses #ifdef variable declarations because the shader compiler removes unused variables anyway, and now always calculates the eye vector for simplicity reasons
removed the SURFACENORMALIZE option (now always on, since it doesn't cost much render time and was on by default)
removed all use and detection of half floats (these were originally around 11% speedup on GF6 hardware but but in more recent drivers they've dropped to around 3-6%, and spit out a lot of warnings during shader compilation with no apparent way to fix the warnings)
havoc [Wed, 29 Mar 2006 11:11:46 +0000 (11:11 +0000)]
eliminated model->meshlist, replaced with an embedded model->surfmesh to cut down on pointer indirections, this also eliminated surface->groupmesh
some minor optimizations of code to keep track of ent->model in a local variable rather than dereferencing ent every time
havoc [Wed, 29 Mar 2006 09:18:50 +0000 (09:18 +0000)]
no longer uses multiple meshes for model loading, they each use one mesh for all surfaces combined
now puts all q3bsp map geometry into one mesh at load rather than splitting it into 65536 vertex meshes to crutch up broken drivers (they've been fixed already so this is no longer necessary)
havoc [Tue, 28 Mar 2006 13:02:06 +0000 (13:02 +0000)]
modified gamma handling, now VID_UpdateGamma is only called from VID_Finish, and VID_SetGamma/VID_GetGamma/VID_UpdateGamma take rampsize parameters
VID_UpdateGamma now supports ramp sizes other than 256, and automatically allocates memory accordingly, this allows hardware gamma on X11 to work on Quadro cards (which report 1024 gamma entries according to div0), and allows any other platform to do whatever it wishes
havoc [Tue, 28 Mar 2006 10:17:21 +0000 (10:17 +0000)]
added loading of hmap2 .dlit tangentspace deluxemap files and a rather lame method of lightstyle support (blending the deluxemaps according to lightstyles, not rendering them separately like it should)
havoc [Sun, 26 Mar 2006 07:17:32 +0000 (07:17 +0000)]
added r_showsurfaces rendering mode which illustrates how many surfaces are on screen (and renders REALLY FAST)
moved r_showcollisionbrushes code to gl_rmain.c
havoc [Sun, 26 Mar 2006 06:43:50 +0000 (06:43 +0000)]
eliminated the hacky r_showtris code, now r_glsl 1 mode works with r_showtris
rewrote r_showtris and r_shownormals to use opaque lines that write to the depth buffer, this makes them show up quite clearly in all cases
moved r_showtris and r_shownormals code into R_DrawSurfaces