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
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)