havoc [Tue, 22 Oct 2002 07:13:13 +0000 (07:13 +0000)]
reworked visibility a bit (added VIS_CullBox and VIS_CullSphere) so it can be pretty accurate
made pvs surface/leaf lists to make R_SurfaceWorldNode as fast as possible
world geometry now casts shadows from frontfaces instead of backfaces
fixed most shadowing bugs
static shadow volumes now work (other than one bug I'm trying to find) and are on by default
havoc [Sat, 19 Oct 2002 23:23:03 +0000 (23:23 +0000)]
reorganized how heartbeat timing works (much simpler and cleaner now)
sv_heartbeatperiod controls how often a heartbeat is sent
sv_public controls whether heartbeats are sent at all (default: 0)
sv_masterextra1 added (points at a master server that a friend just put online)
molivier [Sat, 19 Oct 2002 09:43:46 +0000 (09:43 +0000)]
Added a test when freeing textures (glt->image can be NULL if the program exits because of a lack of memory at startup). Also, Transfusion doesn't have a "start" map, so Transfusion dedicated servers shouldn't use it as their default map. Removed a preprocessor warning in r_shadow.c
havoc [Wed, 16 Oct 2002 21:48:14 +0000 (21:48 +0000)]
fixed some dynamic lighting bugs related to glowing self
rmeshstate_t now has alphascale
now clears stencil from shadows differently (draws shadow volume over again to clear)
R_LightModel now does GL_Color or GL_UseColorArray depending on whether the model has any shading
model->DrawBaseLighting function is gone, now just a few special cases in the normal Draw function
removed R_NotCulledBox
added PVS_CullBox, R_CullSphere, and PVS_CullSphere
visiblevolume flag is gone from shadow rendering code (visible volumes are now automatic depending on what stage the shadow system is in)
R_DrawShadowVolumes is gone (now just a special option to R_ShadowVolumeLighting)
cubemap textures now upload correctly
doubled the bumpyness of surfaces to make bumpmapping noticable (still less than tenebrae)
fixed crash when loading external map textures
now supports _luma as an alternate name for _glow map textures (tenebrae compatibility)
can now override _bump, _gloss, and _glow/_luma textures that were generated from the map
bumpmapping works on the map now (that was a stupid typo...)
now uses alpha buffering for multi-pass lighting effects
r_shadows 3 now works on Geforce2 (2tex no3D 3 pass per layer) and Radeon (2tex 3D 2 pass per layer - Radeon has 3 texture units but the lighting code is most efficient with 2 units, and 3D textures use up 2 texture units on Radeon... lame...)
gloss isn't working yet
r_shadows 3 mode supports up to 64x overbright lighting now (by rendering light multiple times)
fixed palettes (this fixes oddities like seeing sky behind fullbrights)
havoc [Mon, 14 Oct 2002 19:05:23 +0000 (19:05 +0000)]
R_LoadTexture functions take a palette pointer now
there are many palettes available now (d_8to24table renamed to palette_complete)
R_LoadTexture is gone, use R_LoadTexture2D instead
bumpmaps are now generated for models and maps (sigh, so much reworking of their loaders)
havoc [Sun, 13 Oct 2002 22:13:57 +0000 (22:13 +0000)]
added TEXF_CLAMP flag for textures
r_shadows 3 mode is under heavy construction
changed pvsframecount stuff to be part of the model structure
new function Mod_BuildTextureVectorsAndNormals added
changed/improved how animating textures work
surface texture chains are now permanent for the lifetime of the model, and are specific to each submodel
surface textures now have a rendertype field which is updated every time R_PrepareSurfaces is called, values are SURFRENDER_ADD, SURFRENDER_ALPHA, or SURFRENDER_OPAQUE
added SHADERSTAGE_BASELIGHTING
added surfaceneighbors system (currently disabled because it increases load time greatly)
surface meshs are now allocated by a single function to simplify things
more heavy construction on static shadow volumes (which aren't working correctly)
VectorNormalize, VectorNormalize2, and VectorNormalizeDouble macros no longer produce infinite vectors if given null vectors
corrected names of dot3 enums
reduced duplicate code in texture manager with some new arrays for gl texture type enums
added GL_SetupView_Mode_PerspectiveInfiniteFarClip based on code from tenebrae
texture state management now has combinergb and combinealpha for each texture unit
aliasvert array went away
aliasvert_svectors, aliasvert_tvectors, and aliasvert_normals added (note: padded to 4 floats)
aliasvertnorm replaced with aliasvert_normals (adjusted code to use 4 float padding)
new r_light_* cvars allow tweaking of r_shadows 3 lighting system
R_DrawShadowSphere now works correctly
fixed fakeshadows appearing ontop of transparent stuff
got rid of unused RSurfShader_Wall_Fullbright
havoc [Fri, 4 Oct 2002 22:28:42 +0000 (22:28 +0000)]
forgot to add prototypes for new texture functions to r_textures.h
fixed misreporting of texture memory use (was reporting 0 for all textures because sides was 0)
havoc [Fri, 4 Oct 2002 21:04:11 +0000 (21:04 +0000)]
1D, 3D, and cubemap textures are now supported (in addition to 2D)
added detection of GL_EXT_texture3D, GL_ARB_texture_cube_map, and GL_ARB_texture_env_dot3
shadow volume rendering mode now depends on all of the above being present (but doesn't use them yet)
havoc [Fri, 4 Oct 2002 13:52:01 +0000 (13:52 +0000)]
shadow volume rendering still very incomplete, but works mostly
committing this before I add 3D textures to the texture manager
(alert: this is the last version of the stencil shadow rendering that will work with TNT class hardware (and not well), 3D textures will be required and will not work on TNT class... sorry. vertex just looks too horrible)
molivier [Fri, 4 Oct 2002 06:05:46 +0000 (06:05 +0000)]
Added a couple more "const". Fixed "+map" in the command line for dedicated servers. Updated LordHavoc email address in the multiplayer menu. Removed some duplicated code.
havoc [Thu, 3 Oct 2002 17:11:24 +0000 (17:11 +0000)]
massive coding has been done on shadow volumes (some scrapped code which will be removed, some incomplete code, etc)
some model fixes relating to gl_combine - r_quickmodels is gone
off-screen models were not being culled (oops)
molivier [Wed, 2 Oct 2002 06:50:45 +0000 (06:50 +0000)]
Tried to be a little smarter with the heartbeats, using a simple priority mecanism. Added a few "const" here and there in the net code. Fixed heartbeat code on Win32 (added Loop_Heartbeat and Datagram_Heartbeat to net_win.c; oups...)
optimized trianglefacing calculation, per Vic's recommendation (yes it's all one statement now)
shadow functions now take a vertex array pointer, to make them more broadly useful (in precomputation perhaps?)
beginning work on a precomputed shadow volumes system for static lights
bmodel shadow volumes
static lights (in maps with .lights files) now cast shadow volumes (this combined with the above makes dpdm1 and dpdm2 unplayably slow - need to do precomputed world shadow volumes)
(note: like the previous shadow volume commits, this is still just visible volumes when you use r_shadows 2, purely experimental still)
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