havoc [Sun, 3 Feb 2008 11:12:42 +0000 (11:12 +0000)]
fix Black's PRVM_EDICT_NUM_ERROR return type change which did not work
(0 is not the same as NULL, compilers get upset about that)
one other minor correction of the same kind
divverent [Sat, 2 Feb 2008 18:38:38 +0000 (18:38 +0000)]
fix bugs with changing apple_mouse_noaccel and vid_dgamouse while grabbed (that previously could "destroy" mouse support until console gets pulled down and up)
black [Fri, 1 Feb 2008 16:21:37 +0000 (16:21 +0000)]
Rewrite CSQC's setmodel a bit.
Add support for CSQC_Ent_Spawn to csqc. A function that is called when a entity packet from the server arrives that requires a new entity.
entity( float entnum ) CSQC_Ent_Spawn;
CSQC_Ent_Spawn needs to spawn a new entity and set its .entnum field accordingly or simply return another existing entity or world if it wants to ignore that server entity. Subsequent CSQC_Ent_Update calls are routed to that entity (or CSQC_Ent_Spawn is called again when .Version increases).
divverent [Fri, 1 Feb 2008 08:56:31 +0000 (08:56 +0000)]
- vid_userefreshrate: when 0, a sane default is tried to be used
- win32: list valid modes, and use the closest match
- win32: vid_forcerefreshrate: don't do the listing, but just try to set it anyway
havoc [Fri, 1 Feb 2008 06:00:59 +0000 (06:00 +0000)]
renamed MATERIALFLAG_WATER to MATERIALFLAG_WATERSCROLL
changed all MATERIALFLAG_WATER materials to use MATERIALFLAG_WALL as
their primary material flag, this simplified some rendering code
did some more tweaks to fix issues with the mirror glass texture in
the tenebrae testmap
havoc [Tue, 29 Jan 2008 18:53:55 +0000 (18:53 +0000)]
changed postprocess shader to use Texture_GammaRamps instead of
Texture_Attenuation to make the code more clear (no impact on
performance)
fixed bug with viewblend being applied inversely
divverent [Tue, 29 Jan 2008 16:55:43 +0000 (16:55 +0000)]
v_glslgamma: make GLSL postprocessing take over the job of v_hwgamma completely, if set and glsl works. Costs here 1.6ms per frame, so I'll keep r_glsl_contrastboost.
divverent [Tue, 29 Jan 2008 12:29:14 +0000 (12:29 +0000)]
add an extra unused #ifdef to the glsl shader so the shader can know if it was actually enabled by r_glsl_postprocessing or if it was just forced by bloom
divverent [Tue, 29 Jan 2008 12:08:06 +0000 (12:08 +0000)]
make other parts of DP able to retrieve the gamma table, and add a serial field so other subsystems can poll if it has changed. Useful for handling it using glsl.
divverent [Tue, 29 Jan 2008 11:39:41 +0000 (11:39 +0000)]
v_contrastboost, and support for the color control functions to fill the gamma table. Goal: remove USECONTRASTBOOST and USEGAMMA in the postprocess shader, replace it by USEGAMMARAMP, and let vid_shared build the gamma tables even if hw gamma is off when glsl needs them... then add a cvar r_glsl_hwgamma that lets glsl take over gamma ramp handling
divverent [Mon, 28 Jan 2008 09:40:11 +0000 (09:40 +0000)]
add a DEMOMSG_CLIENT_TO_SERVER flag to demos (0x80000000) in the size field; packets with this flag will be ignored by playback. sv_autodemo_perclient 2 will record these packages for debugging purposes (like, recording a speedhacker's or other protocol exploiter's packets, and analyzing them with the data in the demo file manually)
havoc [Mon, 28 Jan 2008 03:36:03 +0000 (03:36 +0000)]
added r_glsl_postprocess cvar to apply a postprocessing pass over the
screen (currently only implements r_glsl_contrastboost)
this path is also activated if bloom or hdr is active with r_glsl 1
black [Mon, 28 Jan 2008 01:02:56 +0000 (01:02 +0000)]
Make fgets always return the null string on error.
Add code to FS_Open to fix bad paths (replaces \ with /). The code is nasty and #ifdefed out - #define FS_FIX_PATHS to use it.
black [Sun, 27 Jan 2008 18:49:34 +0000 (18:49 +0000)]
R_SetView now supports VF_CLEARSCREEN which decides whether to clear the screen or not when rendering the view (this is of particular interest for rendering view in views or for the menu).
black [Sun, 27 Jan 2008 17:23:08 +0000 (17:23 +0000)]
Pass the name of the instance to Gecko_Query, too.
Add setattachment, gettaginfo and gettagindex to menu builtin list, too.
Add DP_GECKO_SUPPORT and DP_QC_GETSURFACEPOINTATTRIB to dpextensions.qc.
havoc [Sun, 27 Jan 2008 08:39:42 +0000 (08:39 +0000)]
some surface rendering code cleanup
eliminated several redundant state calls
eliminated RSurf_CleanUp function
eliminated special gl_lightmaps rendering path
moved all but the basic material rendering from R_DrawTextureSurfaceList
to R_ProcessTextureSurfaceList, this simplifies the transparent callback
and allowed me to move the transparent queuing into this function
havoc [Sun, 27 Jan 2008 06:28:54 +0000 (06:28 +0000)]
implemented r_glsl_usegeneric cvar, this causes generic GLSL shaders to
be used in place of ALL conventional fixedfunction rendering, seems to
give about a 3% fps increase on NVIDIA drivers
this should fix zfighting issues involving r_depthfirst or shadows,
particularly on Mac OSX (may also fix the OSX rotating/scrolling hud)
black [Sun, 27 Jan 2008 02:18:54 +0000 (02:18 +0000)]
Add R_SelectScene and R_GetScenePointer that encapsulate access to an array of r_refdef_scene_t that is swapped into r_refdef on need.
Change the menu to use it and fix a bug that was caused because of the menu's use of the stack for backing up the client's scene.
havoc [Sun, 27 Jan 2008 00:55:22 +0000 (00:55 +0000)]
rewrote most of the VM_Polygon/DebugPolygon code, it should perform much
better now and has no upper limit on polygons, and only a 64 point limit
per polygon, and has transparent sorting again
havoc [Fri, 25 Jan 2008 23:31:06 +0000 (23:31 +0000)]
disabled size throttling of packets if csqc is used (because it was very
easy to end up with >128 byte entity updates which can in some cases
never be sent at all due to the size throttling)
havoc [Fri, 25 Jan 2008 19:47:02 +0000 (19:47 +0000)]
vary r_drawparticles_drawdistance and r_drawdecals_drawdistance for
quality limiting according to FPS, instead of skipping particles, this
looks much better (but doesn't help FPS as much)
havoc [Fri, 25 Jan 2008 08:48:57 +0000 (08:48 +0000)]
implemented framerate-dependent particle quality reduction to try to
smooth out fps swings in Ruiner in Nexuiz
added r_drawparticles_drawdistance (and one for decals)
particles and decals arrays now grow dynamically and have smaller
defaults than before
fixed bug with rain particles that made them live for about 4 minutes if
they fell out of the map
havoc [Tue, 22 Jan 2008 20:05:42 +0000 (20:05 +0000)]
merged CL_MoveParticles, CL_MoveDecals, and R_MoveExplosions into their
respective Draw functions, this gave a small fps gain (due to better
cache behavior)
redesigned input packet timing (now based on cl.time instead of
realtime, which required compensating for slowmo), this takes advantage
of the time synchronization features of the cl.time code
replaced cls.movesequence with cls.netcon->outgoing_unreliable_sequence
havoc [Tue, 22 Jan 2008 19:56:33 +0000 (19:56 +0000)]
fixed sprites rendering incorrectly in reflections (the view vectors no
longer match the actual rendering matrix in the reflection case, fixing
such problems)
divverent [Sun, 20 Jan 2008 19:45:25 +0000 (19:45 +0000)]
For some reason, cl_netinputpacketsperserverpacket > 1 causes choppiness when cl_movement is active and fps are high.
As workaround, disable the "replying to server frames" code for cl_netinputpacketsperserverpacket > 1, and make it ONLY respond to server frames (or after 0.1s when no server frame came) when set to 0. 0 MAY be a bit more smooth than 1, but something tells me it is LESS smooth when packet loss is involved.
divverent [Sat, 19 Jan 2008 01:46:58 +0000 (01:46 +0000)]
Fix bug in stringbuffers with bufstr_set not updating num_strings; add a new builtin for QC called float hash(float caseinsensitive, string str) that returns the CRC of the string (possibly after lowercasing). Using this, a persistent database can be implemented quite efficiently (for a 1MB database file, it takes about 0.1 seconds to load and 0.3 seconds to save, which is quite acceptable). From QC, I use a string buffer of 16384 strings, indexed by hash of the key, containing an info string at each index to solve the collision issue. Possibly add hash() to the stringbuffer DP extension, or make a new extension for it?
havoc [Thu, 17 Jan 2008 13:19:11 +0000 (13:19 +0000)]
rewrote most of the DP_QC_STRINGBUFFERS implementation
string buffers are now associated with their parent progs (and no longer
leak when the progs is freed)
removed almost all limits on string buffers (there is a sanity limit of
a million strings per buffer)