2004-08-23 00:15:46 +00:00
/*
Copyright ( C ) 1996 - 1997 Id Software , Inc .
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
See the GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
// refresh.h -- public interface to refresh functions
2005-12-22 20:35:04 +00:00
// default soldier colors
# define TOP_DEFAULT 1
# define BOTTOM_DEFAULT 6
# define TOP_RANGE (TOP_DEFAULT<<4)
# define BOTTOM_RANGE (BOTTOM_DEFAULT<<4)
2004-08-23 00:15:46 +00:00
struct msurface_s ;
2010-07-11 10:53:13 +00:00
struct batch_s ;
2010-11-11 18:22:49 +00:00
struct model_s ;
struct texnums_s ;
struct texture_s ;
2004-08-23 00:15:46 +00:00
2014-10-05 20:04:11 +00:00
static const texid_t r_nulltex = NULL ;
2009-11-04 21:16:50 +00:00
2022-03-08 05:32:03 +00:00
//GLES2 requires GL_UNSIGNED_SHORT (gles3 or GL_OES_element_index_uint relax this requirement)
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
//geforce4 only does shorts. gffx can do ints, but with a performance hit (like most things on that gpu)
//ati is generally more capable, but generally also has a smaller market share
2016-07-12 00:40:13 +00:00
//desktop-gl will generally cope with ints, but expect a performance hit from that with old gpus (so we don't bother)
//vulkan+dx10 can cope with ints, but might be 24bit
//either way, all renderers in the same build need to use the same thing.
2021-11-10 01:35:55 +00:00
# ifndef sizeof_index_t
# ifdef VERTEXINDEXBYTES //maybe set in config_*.h
# define sizeof_index_t VERTEXINDEXBYTES
# elif (defined(GLQUAKE) && defined(HAVE_LEGACY)) || defined(MINIMAL) || defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(ANDROID) || defined(FTE_TARGET_WEB)
# define sizeof_index_t 2
# endif
2009-11-04 21:16:50 +00:00
# endif
# if sizeof_index_t == 2
# define GL_INDEX_TYPE GL_UNSIGNED_SHORT
# define D3DFMT_QINDEX D3DFMT_INDEX16
2016-07-21 19:27:59 +00:00
# define DXGI_FORMAT_INDEX_UINT DXGI_FORMAT_R16_UINT
2016-07-12 00:40:13 +00:00
# define VK_INDEX_TYPE VK_INDEX_TYPE_UINT16
2009-11-04 21:16:50 +00:00
typedef unsigned short index_t ;
2016-07-12 00:40:13 +00:00
# define MAX_INDICIES 0xffffu
2009-11-04 21:16:50 +00:00
# else
2021-11-10 01:35:55 +00:00
# undef sizeof_index_t
# define sizeof_index_t 4
2009-11-04 21:16:50 +00:00
# define GL_INDEX_TYPE GL_UNSIGNED_INT
# define D3DFMT_QINDEX D3DFMT_INDEX32
2016-07-21 19:27:59 +00:00
# define DXGI_FORMAT_INDEX_UINT DXGI_FORMAT_R32_UINT
2016-07-12 00:40:13 +00:00
# define VK_INDEX_TYPE VK_INDEX_TYPE_UINT32
2009-11-04 21:16:50 +00:00
typedef unsigned int index_t ;
2016-07-12 00:40:13 +00:00
# define MAX_INDICIES 0x00ffffffu
2009-11-04 21:16:50 +00:00
# endif
2004-08-23 00:15:46 +00:00
//=============================================================================
2011-04-20 23:05:45 +00:00
//the eye doesn't see different colours in the same proportion.
//must add to slightly less than 1
# define NTSC_RED 0.299
# define NTSC_GREEN 0.587
# define NTSC_BLUE 0.114
# define NTSC_SUM (NTSC_RED + NTSC_GREEN + NTSC_BLUE)
2005-08-26 22:56:51 +00:00
typedef enum {
RT_MODEL ,
RT_POLY ,
RT_SPRITE ,
RT_BEAM ,
RT_RAIL_CORE ,
RT_RAIL_RINGS ,
RT_LIGHTNING ,
RT_PORTALSURFACE , // doesn't draw anything, just info for portals
2017-06-21 01:24:25 +00:00
//q3 ones stop here.
//fte ones start here
RT_PORTALCAMERA , // an alternative to RT_PORTALSURFACE.
2005-08-26 22:56:51 +00:00
RT_MAX_REF_ENTITY_TYPE
} refEntityType_t ;
2004-08-23 00:15:46 +00:00
2014-03-30 08:55:06 +00:00
typedef unsigned int skinid_t ; //skin 0 is 'unused'
2011-10-27 15:46:36 +00:00
struct dlight_s ;
2004-08-23 00:15:46 +00:00
typedef struct entity_s
{
2015-07-09 18:02:49 +00:00
//FIXME: instancing somehow. separate visentity+visinstance. only viable with full glsl though.
//will need to generate a vbo somehow for the instances.
2004-08-23 00:15:46 +00:00
int keynum ; // for matching entities in different frames
vec3_t origin ;
2015-07-09 18:02:49 +00:00
vec3_t angles ; // fixme: should be redundant.
2004-12-24 08:45:56 +00:00
vec3_t axis [ 3 ] ;
2011-09-03 03:49:43 +00:00
vec4_t shaderRGBAf ; /*colormod+alpha, available for shaders to mix*/
float shaderTime ; /*timestamp, for syncing shader times to spawns*/
vec3_t glowmod ; /*meant to be a multiplier for the fullbrights*/
2004-08-23 00:15:46 +00:00
2015-07-09 18:02:49 +00:00
int light_known ; /*bsp lighting has been calced*/
2016-07-12 00:40:13 +00:00
vec3_t light_avg ; /*midpoint level*/
vec3_t light_range ; /*avg + this = max, avg - this = min*/
vec3_t light_dir ;
2011-04-30 17:21:10 +00:00
2015-07-09 18:02:49 +00:00
vec3_t oldorigin ; /*for q2/q3 beams*/
2004-08-23 00:15:46 +00:00
struct model_s * model ; // NULL = no model
int skinnum ; // for Alias models
2014-03-30 08:55:06 +00:00
skinid_t customskin ; // quake3 style skins
2004-08-23 00:15:46 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
int playerindex ; //for qw skins
int topcolour ; //colourmapping
int bottomcolour ; //colourmapping
2014-09-17 03:04:08 +00:00
# ifdef HEXEN2
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
int h2playerclass ; //hexen2's quirky colourmapping
2014-09-17 03:04:08 +00:00
# endif
2004-08-23 00:15:46 +00:00
2012-07-20 01:46:05 +00:00
// struct efrag_s *efrag; // linked list of efrags (FIXME)
// int visframe; // last frame this entity was
2004-08-23 00:15:46 +00:00
// found in an active leaf
// only used for static objects
2012-07-20 01:46:05 +00:00
// int dlightframe; // dynamic lighting
2020-03-25 21:29:30 +00:00
// dlightbitmask_t dlightbits;
2004-08-23 00:15:46 +00:00
// FIXME: could turn these into a union
2012-07-20 01:46:05 +00:00
// int trivial_accept;
// struct mnode_s *topnode; // for bmodels, first world node
2004-08-23 00:15:46 +00:00
// that splits bmodel, or NULL if
// not split
2008-12-23 02:55:20 +00:00
framestate_t framestate ;
2005-04-16 16:21:27 +00:00
2004-08-23 00:15:46 +00:00
int flags ;
2005-08-26 22:56:51 +00:00
refEntityType_t rtype ;
float rotation ;
2005-02-09 19:32:09 +00:00
struct shader_s * forcedshader ;
2019-04-07 16:41:09 +00:00
pvscache_t pvscache ; //for culling of csqc ents.
2004-08-23 00:15:46 +00:00
# ifdef PEXT_SCALE
float scale ;
# endif
# ifdef PEXT_FATNESS
float fatness ;
# endif
2017-02-19 00:15:42 +00:00
# ifdef HEXEN2
2004-08-23 00:15:46 +00:00
int drawflags ;
int abslight ;
2005-12-22 21:46:28 +00:00
# endif
2004-08-23 00:15:46 +00:00
} entity_t ;
2014-03-30 08:55:06 +00:00
# define MAX_GEOMSETS 32
2015-01-12 12:28:13 +00:00
# define Q1UNSPECIFIED 0x00ffffff //0xffRRGGBB or 0x0000000V are both valid values. so this is an otherwise-illegal value to say its not been set.
2014-03-30 08:55:06 +00:00
typedef struct
{
2018-01-22 19:18:04 +00:00
int refcount ;
2014-03-30 08:55:06 +00:00
char skinname [ MAX_QPATH ] ;
int nummappings ;
int maxmappings ;
qbyte geomset [ MAX_GEOMSETS ] ; //allows selecting a single set of geometry from alternatives. this might be a can of worms.
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
2014-09-08 23:47:19 +00:00
char qwskinname [ MAX_QPATH ] ;
struct qwskin_s * qwskin ;
2015-01-12 12:28:13 +00:00
unsigned int q1upper ; //Q1UNSPECIFIED
unsigned int q1lower ; //Q1UNSPECIFIED
2023-11-18 03:17:06 +00:00
unsigned int h2class ; //Q1UNSPECIFIED. urgh.
2018-03-04 14:41:16 +00:00
# endif
2014-03-30 08:55:06 +00:00
struct
{
char surface [ MAX_QPATH ] ;
shader_t * shader ;
texnums_t texnums ;
int needsfree ; //which textures need to be freed.
} mappings [ 1 ] ;
} skinfile_t ;
2013-10-29 17:38:22 +00:00
// plane_t structure
typedef struct mplane_s
{
vec3_t normal ;
float dist ;
qbyte type ; // for texture axis selection and fast side tests
qbyte signbits ; // signx + signy<<1 + signz<<1
qbyte pad [ 2 ] ;
} mplane_t ;
# define MAXFRUSTUMPLANES 7 //4 side, 1 near, 1 far (fog), 1 water plane.
2014-03-30 08:55:06 +00:00
typedef struct
{
//note: uniforms expect specific padding/ordering. be really careful with reordering this
vec3_t colour ; //w_fog[0].xyz
float alpha ; //w_fog[0].w scales clamped fog value
float density ; //w_fog[1].x egads, everyone has a different opinion.
float depthbias ; //w_fog[1].y distance until the fog actually starts
float glslpad1 ; //w_fog[1].z
float glslpad2 ; //w_fog[1].w
// float start;
// float end;
// float height;
// float fadedepth;
float time ; //timestamp for when its current.
} fogstate_t ;
void CL_BlendFog ( fogstate_t * result , fogstate_t * oldf , float time , fogstate_t * newf ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
void CL_ResetFog ( int fogtype ) ;
2014-03-30 08:55:06 +00:00
2016-02-10 23:23:43 +00:00
typedef enum {
STEREO_OFF ,
STEREO_QUAD ,
STEREO_RED_CYAN ,
STEREO_RED_BLUE ,
STEREO_RED_GREEN ,
STEREO_CROSSEYED ,
//these are internal methods and do not form part of any public API
STEREO_LEFTONLY ,
STEREO_RIGHTONLY
} stereomethod_t ;
typedef enum
{
PROJ_STANDARD = 0 ,
PROJ_STEREOGRAPHIC = 1 , //aka panini
PROJ_FISHEYE = 2 , //standard fisheye
PROJ_PANORAMA = 3 , //for nice panoramas
PROJ_LAEA = 4 , //lambert azimuthal equal-area
PROJ_EQUIRECTANGULAR = 5 //projects a sphere into 2d. used by vr screenshots.
} qprojection_t ;
2014-08-03 14:47:47 +00:00
typedef struct {
char texname [ MAX_QPATH ] ;
} rtname_t ;
# define R_MAX_RENDERTARGETS 8
2014-08-25 07:35:41 +00:00
# ifndef R_MAX_RECURSE
2013-12-29 22:48:28 +00:00
# define R_MAX_RECURSE 6
2014-08-25 07:35:41 +00:00
# endif
2013-06-23 02:17:02 +00:00
# define RDFD_FOV 1
2022-03-08 05:31:34 +00:00
typedef struct refdef_s
2004-08-23 00:15:46 +00:00
{
2013-11-21 23:02:28 +00:00
vrect_t grect ; // game rectangle. fullscreen except for csqc/splitscreen/hud.
vrect_t vrect ; // subwindow in grect for 3d view. equal to grect if no hud.
2010-07-11 02:22:39 +00:00
vec3_t pvsorigin ; /*render the view using this point for pvs (useful for mirror views)*/
vec3_t vieworg ; /*logical view center*/
2004-08-23 00:15:46 +00:00
vec3_t viewangles ;
2010-07-11 02:22:39 +00:00
vec3_t viewaxis [ 3 ] ; /*forward, left, up (NOT RIGHT)*/
2016-02-10 23:23:43 +00:00
vec3_t eyeoffset ; /*world space, for vr screenies*/
2020-01-13 07:03:28 +00:00
vec2_t projectionoffset ; /*for off-centre rendering*/
2004-08-23 00:15:46 +00:00
2021-05-09 13:02:49 +00:00
qboolean base_known ; /*otherwise we do some fallback behaviour (ie: viewangles.0y0 and forcing input_angles)*/
vec3_t base_angles , base_origin ; /*for vr output, overrides per-eye viewangles according to that eye's matrix.*/
2022-03-08 05:32:03 +00:00
vec3_t weaponmatrix [ 4 ] ; /*forward/left/up/origin*/
vec3_t weaponmatrix_bob [ 4 ] ; /*forward/left/up/origin*/
2013-06-23 02:17:02 +00:00
float fov_x , fov_y , afov ;
2017-12-15 06:56:40 +00:00
float fovv_x , fovv_y ; //viewmodel fovs
2016-10-22 07:06:51 +00:00
float mindist , maxdist ; //maxdist may be 0, for 'infinite', in which case mindist probably isn't valid either.
2004-08-23 00:15:46 +00:00
2013-06-23 02:17:02 +00:00
qboolean drawsbar ;
2014-05-30 03:57:30 +00:00
qboolean drawcrosshair ;
2013-06-23 02:17:02 +00:00
int flags ; //(Q2)RDF_ flags
int dirty ;
2004-08-23 00:15:46 +00:00
2013-06-23 02:17:02 +00:00
playerview_t * playerview ;
// int currentplayernum;
2005-02-09 19:32:09 +00:00
float time ;
2012-05-14 01:41:08 +00:00
// float waterheight; //updated by the renderer. stuff sitting at this height generate ripple effects
2005-07-14 01:57:34 +00:00
2017-12-15 06:56:40 +00:00
float m_projection_std [ 16 ] ; //projection matrix for normal stuff
float m_projection_view [ 16 ] ; //projection matrix for the viewmodel. because people are weird.
2010-07-11 02:22:39 +00:00
float m_view [ 16 ] ;
2016-11-20 20:52:41 +00:00
qbyte * scenevis ; /*this is the vis that's currently being draw*/
2019-07-02 04:12:20 +00:00
int * sceneareas ; /*this is the area info for the camera (should normally be count+one area, but could be two areas near an opaque water plane)*/
2010-07-11 02:22:39 +00:00
2013-10-29 17:38:22 +00:00
mplane_t frustum [ MAXFRUSTUMPLANES ] ;
2015-11-18 07:37:39 +00:00
int frustum_numworldplanes ; //all but far, which isn't culled because this wouldn't cover the entire screen.
int frustum_numplanes ; //includes far plane (which is reduced with fog).
2013-10-29 17:38:22 +00:00
2014-03-30 08:55:06 +00:00
fogstate_t globalfog ;
2015-04-27 12:51:42 +00:00
float hdr_value ;
2011-03-31 02:32:32 +00:00
2019-04-01 10:16:36 +00:00
vec3_t skyroom_pos ; /*the camera position for sky rooms*/
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
vec4_t skyroom_spin ; /*the camera spin for sky rooms*/
2019-04-01 10:16:36 +00:00
qboolean skyroom_enabled ; /*whether a skyroom position is defined*/
2019-07-19 02:13:19 +00:00
int firstvisedict ; /*so we can skip visedicts in skies*/
2019-04-01 10:16:36 +00:00
2016-11-20 20:52:41 +00:00
pxrect_t pxrect ; /*vrect, but in pixels rather than virtual coords*/
qboolean externalview ; /*draw external models and not viewmodels*/
int recurse ; /*in a mirror/portal/half way through drawing something else*/
qboolean forcevis ; /*if true, vis comes from the forcedvis field instead of recalculated*/
2019-06-05 20:48:06 +00:00
unsigned int flipcull ; /*reflected/flipped view, requires inverted culling (should be set to SHADER_CULL_FLIPPED or 0 - its implemented as a xor)*/
2020-12-05 04:08:40 +00:00
unsigned int colourmask ; /*shaderbits mask. anything not here will be forced to 0. this is for red/green type stereo*/
2016-11-20 20:52:41 +00:00
qboolean useperspective ; /*not orthographic*/
2011-10-27 15:46:36 +00:00
2016-02-10 23:23:43 +00:00
stereomethod_t stereomethod ;
2014-08-03 14:47:47 +00:00
rtname_t rt_destcolour [ R_MAX_RENDERTARGETS ] ; /*used for 2d. written by 3d*/
rtname_t rt_sourcecolour ; /*read by 2d. not used for 3d. */
rtname_t rt_depth ; /*read by 2d. used by 3d (renderbuffer used if not set)*/
rtname_t rt_ripplemap ; /*read by 2d. used by 3d (internal ripplemap buffer used if not set)*/
2016-07-12 00:40:13 +00:00
rtname_t nearenvmap ; /*provides a fallback endmap cubemap to render with*/
2012-07-05 19:42:36 +00:00
2016-11-20 20:52:41 +00:00
qbyte * forcedvis ; /*set if forcevis is set*/
2014-06-02 16:50:40 +00:00
qboolean areabitsknown ;
qbyte areabits [ MAX_MAP_AREA_BYTES ] ;
2017-12-03 08:27:27 +00:00
vec4_t userdata [ 16 ] ; /*for custom glsl*/
2019-01-13 16:51:50 +00:00
qboolean warndraw ; /*buggy gamecode likes drawing outside of te drawing logic*/
2004-08-23 00:15:46 +00:00
} refdef_t ;
extern refdef_t r_refdef ;
extern vec3_t r_origin , vpn , vright , vup ;
extern struct texture_s * r_notexture_mip ;
extern entity_t r_worldentity ;
2019-07-02 04:12:20 +00:00
void BE_GenModelBatches ( struct batch_s * * batches , const struct dlight_s * dl , unsigned int bemode , const qbyte * worldpvs , const int * worldareas ) ; //if dl, filters based upon the dlight.
2011-04-23 20:37:20 +00:00
2009-11-07 13:29:15 +00:00
//gl_alias.c
2014-09-08 23:47:19 +00:00
void R_GAliasFlushSkinCache ( qboolean final ) ;
2010-08-28 17:14:38 +00:00
void R_GAlias_DrawBatch ( struct batch_s * batch ) ;
void R_GAlias_GenerateBatches ( entity_t * e , struct batch_s * * batches ) ;
2017-12-09 21:22:46 +00:00
void R_LightArraysByte_BGR ( const entity_t * entity , vecV_t * coords , byte_vec4_t * colours , int vertcount , vec3_t * normals , qboolean colormod ) ;
void R_LightArrays ( const entity_t * entity , vecV_t * coords , avec4_t * colours , int vertcount , vec3_t * normals , float scale , qboolean colormod ) ;
2009-11-07 13:29:15 +00:00
2016-01-18 05:22:07 +00:00
qboolean R_DrawSkyChain ( struct batch_s * batch ) ; /*called from the backend, and calls back into it*/
2020-03-07 09:00:40 +00:00
void R_InitSky ( shader_t * shader , const char * skyname , uploadfmt_t fmt , qbyte * src , unsigned int width , unsigned int height ) ; /*generate q1 sky texnums*/
2010-11-11 18:22:49 +00:00
2015-03-03 00:14:43 +00:00
void R_Clutter_Emit ( struct batch_s * * batches ) ;
void R_Clutter_Purge ( void ) ;
2009-11-07 13:29:15 +00:00
//r_surf.c
2022-03-08 05:31:34 +00:00
void Surf_NewMap ( struct model_s * worldmodel ) ;
2014-10-05 20:04:11 +00:00
void Surf_PreNewMap ( void ) ;
2014-03-30 08:55:06 +00:00
void Surf_SetupFrame ( void ) ; //determine pvs+viewcontents
2009-11-07 13:29:15 +00:00
void Surf_DrawWorld ( void ) ;
2010-11-02 23:17:25 +00:00
void Surf_GenBrushBatches ( struct batch_s * * batches , entity_t * ent ) ;
2023-08-01 11:08:51 +00:00
void Surf_StainSurf ( struct model_s * mod , struct msurface_s * surf , float * parms ) ;
2009-11-07 13:29:15 +00:00
void Surf_AddStain ( vec3_t org , float red , float green , float blue , float radius ) ;
void Surf_LessenStains ( void ) ;
void Surf_WipeStains ( void ) ;
void Surf_DeInit ( void ) ;
2010-07-13 09:49:38 +00:00
void Surf_Clear ( struct model_s * mod ) ;
2012-11-27 03:23:19 +00:00
void Surf_BuildLightmaps ( void ) ; //enables Surf_BuildModelLightmaps, calls it for each bsp.
2021-07-06 00:12:20 +00:00
void Surf_ClearSceneCache ( void ) ; //stops Surf_BuildModelLightmaps from working.
2012-11-27 03:23:19 +00:00
void Surf_BuildModelLightmaps ( struct model_s * m ) ; //rebuild lightmaps for a single bsp. beware of submodels.
2011-04-30 17:21:10 +00:00
void Surf_RenderDynamicLightmaps ( struct msurface_s * fa ) ;
void Surf_RenderAmbientLightmaps ( struct msurface_s * fa , int ambient ) ;
2009-11-07 13:29:15 +00:00
int Surf_LightmapShift ( struct model_s * model ) ;
2015-04-14 23:12:17 +00:00
# define LMBLOCK_SIZE_MAX 2048 //single axis
2009-11-07 13:29:15 +00:00
typedef struct glRect_s {
2015-10-11 11:34:58 +00:00
unsigned short l , t , r , b ;
2009-11-07 13:29:15 +00:00
} glRect_t ;
typedef unsigned char stmap ;
struct mesh_s ;
typedef struct {
2012-07-05 19:42:36 +00:00
texid_t lightmap_texture ;
2018-10-27 04:32:18 +00:00
qboolean modified ; //data was changed. consult rectchange to see the bounds.
qboolean external ; //the data was loaded from a file (q3bsp feature where we shouldn't be blending lightmaps at all)
qboolean hasdeluxe ; //says that the next lightmap index contains deluxemap info
uploadfmt_t fmt ; //texture format that we're using
qbyte pixbytes ; //yes, this means no compressed formats.
2012-07-05 19:42:36 +00:00
int width ;
int height ;
2009-11-07 13:29:15 +00:00
glRect_t rectchange ;
2018-10-27 04:32:18 +00:00
qbyte * lightmaps ; //[pixbytes*LMBLOCK_WIDTH*LMBLOCK_HEIGHT];
stmap * stainmaps ; //[3*LMBLOCK_WIDTH*LMBLOCK_HEIGHT]; //rgb no a. added to lightmap for added (hopefully) speed.
2020-04-19 01:23:32 +00:00
# ifdef GLQUAKE
int pbo_handle ; //when set, lightmaps is a persistently mapped write-only pbo for us to scribble data into, ready to be copied to the actual texture without waiting for glTexSubImage to complete.
# endif
2009-11-07 13:29:15 +00:00
} lightmapinfo_t ;
extern lightmapinfo_t * * lightmap ;
extern int numlightmaps ;
2015-03-03 00:14:43 +00:00
2015-04-21 04:12:00 +00:00
void QDECL Surf_RebuildLightmap_Callback ( struct cvar_s * var , char * oldvalue ) ;
2009-11-07 13:29:15 +00:00
2021-07-17 15:10:30 +00:00
void R_Sky_Register ( void ) ;
2017-08-29 02:29:06 +00:00
void R_SkyShutdown ( void ) ;
void R_SetSky ( const char * skyname ) ;
2020-04-19 01:23:32 +00:00
texid_t R_GetDefaultEnvmap ( void ) ;
2009-11-07 13:29:15 +00:00
2009-11-04 21:16:50 +00:00
# if defined(GLQUAKE)
2004-08-23 00:15:46 +00:00
void GLR_Init ( void ) ;
void GLR_InitTextures ( void ) ;
void GLR_InitEfrags ( void ) ;
void GLR_RenderView ( void ) ; // must set r_refdef first
// called whenever r_refdef or vid change
2013-12-29 22:48:28 +00:00
void GLR_DrawPortal ( struct batch_s * batch , struct batch_s * * blist , struct batch_s * depthmasklist [ 2 ] , int portaltype ) ;
2004-08-23 00:15:46 +00:00
void GLR_PushDlights ( void ) ;
void GLR_DrawWaterSurfaces ( void ) ;
2005-06-22 17:10:13 +00:00
void GLVID_DeInit ( void ) ;
void GLR_DeInit ( void ) ;
void GLSCR_DeInit ( void ) ;
2009-11-04 21:16:50 +00:00
void GLVID_Console_Resize ( void ) ;
2004-08-23 00:15:46 +00:00
# endif
2012-05-09 15:30:53 +00:00
int R_LightPoint ( vec3_t p ) ;
void R_RenderDlights ( void ) ;
2004-08-23 00:15:46 +00:00
2020-08-13 08:39:48 +00:00
typedef struct
{
int allocated [ LMBLOCK_SIZE_MAX ] ;
int firstlm ;
int lmnum ;
unsigned int width ;
unsigned int height ;
qboolean deluxe ;
} lmalloc_t ;
void Mod_LightmapAllocInit ( lmalloc_t * lmallocator , qboolean hasdeluxe , unsigned int width , unsigned int height , int firstlm ) ; //firstlm is for debugging stray lightmap indexes
//void Mod_LightmapAllocDone(lmalloc_t *lmallocator, model_t *mod);
void Mod_LightmapAllocBlock ( lmalloc_t * lmallocator , int w , int h , unsigned short * x , unsigned short * y , int * tnum ) ;
2009-11-04 21:16:50 +00:00
enum imageflags
{
/*warning: many of these flags only apply the first time it is requested*/
2019-03-12 05:04:27 +00:00
IF_CLAMP = 1 < < 0 , //disable texture coord wrapping.
IF_NOMIPMAP = 1 < < 1 , //disable mipmaps.
IF_NEAREST = 1 < < 2 , //force nearest
IF_LINEAR = 1 < < 3 , //force linear
IF_UIPIC = 1 < < 4 , //subject to texturemode2d
//IF_DEPTHCMD = 1<<5, //Reserved for d3d11
IF_SRGB = 1 < < 6 , //texture data is srgb (read-as-linear)
2014-10-05 20:04:11 +00:00
/*WARNING: If the above are changed, be sure to change shader pass flags*/
2019-03-12 05:04:27 +00:00
IF_NOPICMIP = 1 < < 7 ,
IF_NOALPHA = 1 < < 8 , /*hint rather than requirement*/
IF_NOGAMMA = 1 < < 9 , /*do not apply texture-based gamma*/
2019-10-18 08:37:38 +00:00
IF_TEXTYPEMASK = ( 1 < < 10 ) | ( 1 < < 11 ) | ( 1 < < 12 ) , /*0=2d, 1=3d, 2=cubeface, 3=2d array texture*/
# define IF_TEXTYPESHIFT 10
# define IF_TEXTYPE_2D (PTI_2D<<IF_TEXTYPESHIFT)
# define IF_TEXTYPE_3D (PTI_3D<<IF_TEXTYPESHIFT)
# define IF_TEXTYPE_CUBE (PTI_CUBE<<IF_TEXTYPESHIFT)
# define IF_TEXTYPE_2D_ARRAY (PTI_2D_ARRAY<<IF_TEXTYPESHIFT)
# define IF_TEXTYPE_CUBE_ARRAY (PTI_CUBE_ARRAY<<IF_TEXTYPESHIFT)
2020-03-07 09:00:40 +00:00
# define IF_TEXTYPE_ANY (PTI_ANY<<IF_TEXTYPESHIFT)
2019-10-18 08:37:38 +00:00
IF_MIPCAP = 1 < < 13 , //allow the use of d_mipcap
IF_PREMULTIPLYALPHA = 1 < < 14 , //rgb *= alpha
2019-03-12 05:04:27 +00:00
IF_UNUSED15 = 1 < < 15 , //
IF_UNUSED16 = 1 < < 16 , //
2021-06-25 18:50:59 +00:00
IF_INEXACT = 1 < < 17 , //subdir info isn't to be used for matching
2019-03-12 05:04:27 +00:00
IF_WORLDTEX = 1 < < 18 , //gl_picmip_world
IF_SPRITETEX = 1 < < 19 , //gl_picmip_sprites
IF_NOSRGB = 1 < < 20 , //ignore srgb when loading. this is guarenteed to be linear, for normalmaps etc.
IF_PALETTIZE = 1 < < 21 , //convert+load it as an RTI_P8 texture for the current palette/colourmap
IF_NOPURGE = 1 < < 22 , //texture is not flushed when no more shaders refer to it (for C code that holds a permanant reference to it - still purged on vid_reloads though)
IF_HIGHPRIORITY = 1 < < 23 , //pushed to start of worker queue instead of end...
IF_LOWPRIORITY = 1 < < 24 , //
2020-08-13 08:39:48 +00:00
IF_LOADNOW = 1 < < 25 , /*hit the disk now, and delay the gl load until its actually needed. this is used only so that the width+height are known in advance. valid on worker threads.*/
2019-03-12 05:04:27 +00:00
IF_NOPCX = 1 < < 26 , /*block pcx format. meaning qw skins can use team colours and cropping*/
IF_TRYBUMP = 1 < < 27 , /*attempt to load _bump if the specified _norm texture wasn't found*/
IF_RENDERTARGET = 1 < < 28 , /*never loaded from disk, loading can't fail*/
IF_EXACTEXTENSION = 1 < < 29 , /*don't mangle extensions, use what is specified and ONLY that*/
IF_NOREPLACE = 1 < < 30 , /*don't load a replacement, for some reason*/
IF_NOWORKER = 1u < < 31 /*don't pass the work to a loader thread. this gives fully synchronous loading. only valid from the main thread.*/
2009-11-04 21:16:50 +00:00
} ;
2004-08-23 00:15:46 +00:00
2014-10-05 20:04:11 +00:00
# define R_LoadTexture8(id,w,h,d,f,t) Image_GetTexture(id, NULL, f, d, NULL, w, h, t?TF_TRANS8:TF_SOLID8)
# define R_LoadTexture32(id,w,h,d,f) Image_GetTexture(id, NULL, f, d, NULL, w, h, TF_RGBA32)
# define R_LoadTextureFB(id,w,h,d,f) Image_GetTexture(id, NULL, f, d, NULL, w, h, TF_TRANS8_FULLBRIGHT)
# define R_LoadTexture(id,w,h,fmt,d,fl) Image_GetTexture(id, NULL, fl, d, NULL, w, h, fmt)
2019-02-16 19:09:07 +00:00
image_t * Image_TextureIsValid ( qintptr_t address ) ;
2014-10-05 20:04:11 +00:00
image_t * Image_FindTexture ( const char * identifier , const char * subpath , unsigned int flags ) ;
image_t * Image_CreateTexture ( const char * identifier , const char * subpath , unsigned int flags ) ;
2018-06-02 08:55:57 +00:00
image_t * QDECL Image_GetTexture ( const char * identifier , const char * subpath , unsigned int flags , void * fallbackdata , void * fallbackpalette , int fallbackwidth , int fallbackheight , uploadfmt_t fallbackfmt ) ;
2015-03-03 00:14:43 +00:00
qboolean Image_UnloadTexture ( image_t * tex ) ; //true if it did something.
void Image_DestroyTexture ( image_t * tex ) ;
2018-07-05 16:21:44 +00:00
qboolean Image_LoadTextureFromMemory ( texid_t tex , int flags , const char * iname , const char * fname , qbyte * filedata , int filesize ) ; //intended really for worker threads, but should be fine from the main thread too
qboolean Image_LocateHighResTexture ( image_t * tex , flocation_t * bestloc , char * bestname , size_t bestnamesize , unsigned int * bestflags ) ;
2020-11-04 10:19:30 +00:00
void Image_Upload ( texid_t tex , uploadfmt_t fmt , void * data , void * palette , int width , int height , int depth , unsigned int flags ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
void Image_Purge ( void ) ; //purge any textures which are not needed any more (releases memory, but doesn't give null pointers).
2014-10-05 20:04:11 +00:00
void Image_Init ( void ) ;
void Image_Shutdown ( void ) ;
2019-09-25 20:23:24 +00:00
void Image_PrintInputFormatVersions ( void ) ; //for version info
2018-11-19 06:37:25 +00:00
qboolean Image_WriteKTXFile ( const char * filename , enum fs_relative fsroot , struct pendingtextureinfo * mips ) ;
qboolean Image_WriteDDSFile ( const char * filename , enum fs_relative fsroot , struct pendingtextureinfo * mips ) ;
2020-04-29 10:43:22 +00:00
void Image_BlockSizeForEncoding ( uploadfmt_t encoding , unsigned int * blockbytes , unsigned int * blockwidth , unsigned int * blockheight , unsigned int * blockdepth ) ;
2018-03-04 14:41:16 +00:00
const char * Image_FormatName ( uploadfmt_t encoding ) ;
2019-10-06 01:59:13 +00:00
qboolean Image_FormatHasAlpha ( uploadfmt_t encoding ) ;
2014-10-05 20:04:11 +00:00
image_t * Image_LoadTexture ( const char * identifier , int width , int height , uploadfmt_t fmt , void * data , unsigned int flags ) ;
2019-09-29 02:16:34 +00:00
struct pendingtextureinfo * Image_LoadMipsFromMemory ( int flags , const char * iname , const char * fname , qbyte * filedata , int filesize ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
void Image_ChangeFormat ( struct pendingtextureinfo * mips , qboolean * allowedformats , uploadfmt_t origfmt , const char * imagename ) ;
2020-02-20 02:41:02 +00:00
void Image_Premultiply ( struct pendingtextureinfo * mips ) ;
2019-10-18 08:37:38 +00:00
void * Image_FlipImage ( const void * inbuffer , void * outbuffer , int * inoutwidth , int * inoutheight , int pixelbytes , qboolean flipx , qboolean flipy , qboolean flipd ) ;
2014-10-05 20:04:11 +00:00
2021-11-03 20:31:21 +00:00
typedef struct
{
const char * loadername ;
size_t pendingtextureinfosize ;
qboolean canloadcubemaps ;
struct pendingtextureinfo * ( * ReadImageFile ) ( unsigned int imgflags , const char * fname , qbyte * filedata , size_t filesize ) ;
# define plugimageloaderfuncs_name "ImageLoader"
} plugimageloaderfuncs_t ;
qboolean Image_RegisterLoader ( void * module , plugimageloaderfuncs_t * loader ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
# ifdef D3D8QUAKE
void D3D8_Set2D ( void ) ;
void D3D8_UpdateFiltering ( image_t * imagelist , int filtermip [ 3 ] , int filterpic [ 3 ] , int mipcap [ 2 ] , float anis ) ;
2017-08-14 16:38:44 +00:00
qboolean D3D8_LoadTextureMips ( texid_t tex , const struct pendingtextureinfo * mips ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
void D3D8_DestroyTexture ( texid_t tex ) ;
# endif
2014-10-05 20:04:11 +00:00
# ifdef D3D9QUAKE
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
void D3D9_Set2D ( void ) ;
2019-02-19 06:49:03 +00:00
void D3D9_UpdateFiltering ( image_t * imagelist , int filtermip [ 3 ] , int filterpic [ 3 ] , int mipcap [ 2 ] , float lodbias , float anis ) ;
2017-08-14 16:38:44 +00:00
qboolean D3D9_LoadTextureMips ( texid_t tex , const struct pendingtextureinfo * mips ) ;
2014-10-05 20:04:11 +00:00
void D3D9_DestroyTexture ( texid_t tex ) ;
2009-11-04 21:16:50 +00:00
# endif
2014-10-05 20:04:11 +00:00
# ifdef D3D11QUAKE
2019-02-19 06:49:03 +00:00
void D3D11_UpdateFiltering ( image_t * imagelist , int filtermip [ 3 ] , int filterpic [ 3 ] , int mipcap [ 2 ] , float lodbias , float anis ) ;
2017-08-14 16:38:44 +00:00
qboolean D3D11_LoadTextureMips ( texid_t tex , const struct pendingtextureinfo * mips ) ;
2014-10-05 20:04:11 +00:00
void D3D11_DestroyTexture ( texid_t tex ) ;
2009-11-04 21:16:50 +00:00
# endif
2014-10-05 20:04:11 +00:00
//extern int image_width, image_height;
texid_t R_LoadReplacementTexture ( const char * name , const char * subpath , unsigned int flags , void * lowres , int lowreswidth , int lowresheight , uploadfmt_t fmt ) ;
2014-03-30 08:55:06 +00:00
texid_tf R_LoadHiResTexture ( const char * name , const char * subpath , unsigned int flags ) ;
texid_tf R_LoadBumpmapTexture ( const char * name , const char * subpath ) ;
2014-10-05 20:04:11 +00:00
void R_LoadNumberedLightTexture ( struct dlight_s * dl , int cubetexnum ) ;
2009-11-04 21:16:50 +00:00
extern texid_t particletexture ;
extern texid_t particlecqtexture ;
extern texid_t explosiontexture ;
extern texid_t balltexture ;
extern texid_t beamtexture ;
extern texid_t ptritexture ;
2007-05-25 22:16:29 +00:00
2014-03-30 08:55:06 +00:00
skinid_t Mod_RegisterSkinFile ( const char * skinname ) ;
skinid_t Mod_ReadSkinFile ( const char * skinname , const char * skintext ) ;
2018-01-22 19:18:04 +00:00
void Mod_WipeSkin ( skinid_t id , qboolean force ) ;
2014-03-30 08:55:06 +00:00
skinfile_t * Mod_LookupSkin ( skinid_t id ) ;
2013-10-29 17:38:22 +00:00
void Mod_Init ( qboolean initial ) ;
void Mod_Shutdown ( qboolean final ) ;
2022-03-08 05:31:34 +00:00
int Mod_TagNumForName ( struct model_s * model , const char * name , int firsttag ) ;
2015-06-24 17:59:57 +00:00
int Mod_SkinNumForName ( struct model_s * model , int surfaceidx , const char * name ) ;
int Mod_FrameNumForName ( struct model_s * model , int surfaceidx , const char * name ) ;
2022-01-07 03:18:00 +00:00
int Mod_FrameNumForAction ( struct model_s * model , int surfaceidx , int actionid ) ;
2015-06-24 17:59:57 +00:00
float Mod_GetFrameDuration ( struct model_s * model , int surfaceidx , int frameno ) ;
2013-07-14 12:22:51 +00:00
void Mod_ResortShaders ( void ) ;
void Mod_ClearAll ( void ) ;
2014-03-30 08:55:06 +00:00
struct model_s * Mod_FindName ( const char * name ) ;
2013-07-14 12:22:51 +00:00
void * Mod_Extradata ( struct model_s * mod ) ; // handles caching
2014-03-30 08:55:06 +00:00
void Mod_TouchModel ( const char * name ) ;
2011-05-27 17:59:31 +00:00
void Mod_RebuildLightmaps ( void ) ;
2004-08-23 00:15:46 +00:00
2014-10-05 20:04:11 +00:00
void Mod_NowLoadExternal ( struct model_s * loadmodel ) ;
2006-04-15 05:28:44 +00:00
void GLR_LoadSkys ( void ) ;
2009-11-04 21:16:50 +00:00
void R_BloomRegister ( void ) ;
2004-08-23 00:15:46 +00:00
2014-05-16 01:34:58 +00:00
int Mod_RegisterModelFormatText ( void * module , const char * formatname , char * magictext , qboolean ( QDECL * load ) ( struct model_s * mod , void * buffer , size_t fsize ) ) ;
2021-11-03 20:31:32 +00:00
int Mod_RegisterModelFormatMagic ( void * module , const char * formatname , qbyte * magic , size_t magicsize , qboolean ( QDECL * load ) ( struct model_s * mod , void * buffer , size_t fsize ) ) ;
2014-05-16 01:34:58 +00:00
void Mod_UnRegisterModelFormat ( void * module , int idx ) ;
void Mod_UnRegisterAllModelFormats ( void * module ) ;
2014-10-05 20:04:11 +00:00
void Mod_ModelLoaded ( void * ctx , void * data , size_t a , size_t b ) ;
2021-11-03 20:31:52 +00:00
void Mod_SubmodelLoaded ( struct model_s * mod , int state ) ;
2013-10-29 17:38:22 +00:00
2009-11-04 21:16:50 +00:00
# ifdef RUNTIMELIGHTING
2015-04-14 23:12:17 +00:00
struct relight_ctx_s ;
struct llightinfo_s ;
2023-12-22 09:21:55 +00:00
void LightPlane ( struct relight_ctx_s * ctx , struct llightinfo_s * threadctx , lightstyleindex_t surf_styles [ MAXCPULIGHTMAPS ] , unsigned int * surf_expsamples , qbyte * surf_rgbsamples , qbyte * surf_deluxesamples , vec4_t surf_plane , vec4_t surf_texplanes [ 2 ] , vec2_t exactmins , vec2_t exactmaxs , int texmins [ 2 ] , int texsize [ 2 ] , float lmscale ) ; //special version that doesn't know what a face is or anything.
2017-03-06 14:06:12 +00:00
struct relight_ctx_s * LightStartup ( struct relight_ctx_s * ctx , struct model_s * model , qboolean shadows , qboolean skiplit ) ;
2016-11-25 08:14:54 +00:00
void LightReloadEntities ( struct relight_ctx_s * ctx , const char * entstring , qboolean ignorestyles ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
void LightShutdown ( struct relight_ctx_s * ctx , struct model_s * model ) ;
2015-04-14 23:12:17 +00:00
extern const size_t lightthreadctxsize ;
2020-02-11 18:06:10 +00:00
qboolean RelightSetup ( struct model_s * model , size_t lightsamples , qboolean generatelit ) ;
void RelightThink ( void ) ;
const char * RelightGetProgress ( float * progress ) ; //reports filename and progress
void RelightTerminate ( struct model_s * mod ) ; //NULL acts as a wildcard
2009-11-04 21:16:50 +00:00
# endif
2021-11-04 22:33:00 +00:00
struct builddata_s
{
void ( * buildfunc ) ( struct model_s * mod , struct msurface_s * surf , struct builddata_s * bd ) ;
qboolean paintlightmaps ;
void * facedata ;
} ;
void Mod_Batches_Build ( struct model_s * mod , struct builddata_s * bd ) ;
shader_t * Mod_RegisterBasicShader ( struct model_s * mod , const char * texname , unsigned int usageflags , const char * shadertext , uploadfmt_t pixelfmt , unsigned int width , unsigned int height , void * pixeldata , void * palettedata ) ;
2009-11-04 21:16:50 +00:00
2005-10-16 03:56:32 +00:00
extern struct model_s * currentmodel ;
2004-08-23 00:15:46 +00:00
void Media_CaptureDemoEnd ( void ) ;
void Media_RecordFrame ( void ) ;
2015-06-05 03:45:01 +00:00
qboolean Media_PausedDemo ( qboolean fortiming ) ;
2012-11-27 03:23:19 +00:00
int Media_Capturing ( void ) ;
double Media_TweekCaptureFrameTime ( double oldtime , double time ) ;
2016-01-18 05:22:07 +00:00
void Media_WriteCurrentTrack ( sizebuf_t * buf ) ;
2017-11-14 14:37:04 +00:00
void Media_VideoRestarting ( void ) ;
void Media_VideoRestarted ( void ) ;
2004-08-23 00:15:46 +00:00
2007-08-07 00:11:21 +00:00
void MYgluPerspective ( double fovx , double fovy , double zNear , double zFar ) ;
2010-11-10 03:32:47 +00:00
void R_PushDlights ( void ) ;
2009-11-04 21:16:50 +00:00
void R_SetFrustum ( float projmat [ 16 ] , float viewmat [ 16 ] ) ;
2010-02-06 01:25:04 +00:00
void R_SetRenderer ( rendererinfo_t * ri ) ;
2020-05-14 15:50:26 +00:00
qboolean R_RegisterRenderer ( void * module , rendererinfo_t * ri ) ;
struct plugvrfuncs_s ;
qboolean R_RegisterVRDriver ( void * module , struct plugvrfuncs_s * vrfuncs ) ;
qboolean R_UnRegisterModule ( void * module ) ;
2009-11-04 21:16:50 +00:00
void R_AnimateLight ( void ) ;
2015-04-27 12:51:42 +00:00
void R_UpdateHDR ( vec3_t org ) ;
2014-06-25 03:53:11 +00:00
void R_UpdateLightStyle ( unsigned int style , const char * stylestring , float r , float g , float b ) ;
2019-09-10 15:40:04 +00:00
void R_BumpLightstyles ( unsigned int maxstyle ) ; //bumps the cl_max_lightstyles array size, if needed.
2022-03-08 05:31:34 +00:00
qboolean R_CalcModelLighting ( entity_t * e , struct model_s * clmodel ) ;
2013-12-08 20:06:55 +00:00
struct texture_s * R_TextureAnimation ( int frame , struct texture_s * base ) ; //mostly deprecated, only lingers for rtlights so world only.
struct texture_s * R_TextureAnimation_Q2 ( struct texture_s * base ) ; //mostly deprecated, only lingers for rtlights so world only.
2004-08-23 00:15:46 +00:00
void RQ_Init ( void ) ;
2012-09-30 05:52:03 +00:00
void RQ_Shutdown ( void ) ;
2005-03-10 03:55:18 +00:00
2020-03-07 09:00:40 +00:00
qboolean WritePCXfile ( const char * filename , enum fs_relative fsroot , qbyte * data , int width , int height , int rowbytes , qbyte * palette , qboolean upload ) ; //data is 8bit.
2004-08-23 00:15:46 +00:00
qbyte * ReadPCXFile ( qbyte * buf , int length , int * width , int * height ) ;
2019-09-04 08:32:22 +00:00
void * ReadTargaFile ( qbyte * buf , int length , int * width , int * height , uploadfmt_t * format , qboolean greyonly , uploadfmt_t forceformat ) ;
2023-01-09 05:12:12 +00:00
qbyte * ReadPNGFile ( const char * fname , qbyte * buf , int length , int * width , int * height , uploadfmt_t * format , qboolean force_rgb32 ) ;
2004-08-23 00:15:46 +00:00
qbyte * ReadPCXPalette ( qbyte * buf , int len , qbyte * out ) ;
2019-09-29 02:16:34 +00:00
qbyte * ReadRawImageFile ( qbyte * buf , int len , int * width , int * height , uploadfmt_t * format , qboolean force_rgba8 , const char * fname ) ;
void * Image_ResampleTexture ( uploadfmt_t format , const void * in , int inwidth , int inheight , void * out , int outwidth , int outheight ) ;
void Image_ReadExternalAlpha ( qbyte * rgbadata , size_t imgwidth , size_t imgheight , const char * fname , uploadfmt_t * format ) ;
2018-09-29 17:31:58 +00:00
void BoostGamma ( qbyte * rgba , int width , int height , uploadfmt_t fmt ) ;
2005-05-18 01:40:01 +00:00
void SaturateR8G8B8 ( qbyte * data , int size , float sat ) ;
2005-06-26 12:31:56 +00:00
void AddOcranaLEDsIndexed ( qbyte * image , int h , int w ) ;
2004-08-23 00:15:46 +00:00
void Renderer_Init ( void ) ;
2010-02-06 01:25:04 +00:00
void Renderer_Start ( void ) ;
qboolean Renderer_Started ( void ) ;
2014-03-30 08:55:06 +00:00
void R_ShutdownRenderer ( qboolean videotoo ) ;
2004-09-20 23:25:38 +00:00
void R_RestartRenderer_f ( void ) ; //this goes here so we can save some stack when first initing the sw renderer.
2004-08-23 00:15:46 +00:00
//used to live in glquake.h
2021-08-04 21:17:13 +00:00
qbyte GetPaletteIndexRange ( int first , int stop , int red , int green , int blue ) ;
2007-09-22 19:28:27 +00:00
qbyte GetPaletteIndex ( int red , int green , int blue ) ;
2004-08-23 00:15:46 +00:00
extern cvar_t r_norefresh ;
extern cvar_t r_drawentities ;
extern cvar_t r_drawworld ;
extern cvar_t r_drawviewmodel ;
2006-01-09 01:49:06 +00:00
extern cvar_t r_drawviewmodelinvis ;
2004-08-23 00:15:46 +00:00
extern cvar_t r_speeds ;
extern cvar_t r_waterwarp ;
extern cvar_t r_fullbright ;
extern cvar_t r_lightmap ;
2012-01-21 07:53:49 +00:00
extern cvar_t r_glsl_offsetmapping ;
2019-02-23 14:36:17 +00:00
extern cvar_t r_skyfog ; //additional fog alpha on sky
2016-07-12 00:40:13 +00:00
extern cvar_t r_shadow_playershadows ;
2009-11-04 21:16:50 +00:00
extern cvar_t r_shadow_realtime_dlight , r_shadow_realtime_dlight_shadows ;
2012-12-04 19:37:57 +00:00
extern cvar_t r_shadow_realtime_dlight_ambient ;
extern cvar_t r_shadow_realtime_dlight_diffuse ;
extern cvar_t r_shadow_realtime_dlight_specular ;
2020-05-14 15:50:26 +00:00
extern cvar_t r_shadow_realtime_world , r_shadow_realtime_world_shadows , r_shadow_realtime_world_lightmaps , r_shadow_realtime_world_importlightentitiesfrommap ;
2021-08-28 07:09:54 +00:00
extern float r_shadow_realtime_world_lightmaps_force ;
2024-04-13 21:13:06 +00:00
extern cvar_t r_shadow_raytrace ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
extern cvar_t r_shadow_shadowmapping ;
2024-04-13 21:13:06 +00:00
extern cvar_t r_halfrate ;
2004-08-23 00:15:46 +00:00
extern cvar_t r_mirroralpha ;
extern cvar_t r_wateralpha ;
2014-08-15 02:20:41 +00:00
extern cvar_t r_lavaalpha ;
2014-08-25 07:35:41 +00:00
extern cvar_t r_slimealpha ;
extern cvar_t r_telealpha ;
2012-05-14 01:41:08 +00:00
extern cvar_t r_waterstyle ;
2012-11-27 03:23:19 +00:00
extern cvar_t r_lavastyle ;
2014-08-25 07:35:41 +00:00
extern cvar_t r_slimestyle ;
extern cvar_t r_telestyle ;
2004-08-23 00:15:46 +00:00
extern cvar_t r_dynamic ;
2020-04-19 01:23:32 +00:00
extern cvar_t r_temporalscenecache ;
2004-08-23 00:15:46 +00:00
extern cvar_t r_novis ;
extern cvar_t r_netgraph ;
2018-07-05 16:21:44 +00:00
extern cvar_t r_deluxemapping_cvar ;
extern qboolean r_deluxemapping ;
2020-02-12 12:15:56 +00:00
# ifdef RTLIGHTS
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
extern qboolean r_fakeshadows ; //enables the use of ortho model-only shadows
2020-02-12 12:15:56 +00:00
# endif
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
extern float r_blobshadows ;
2015-08-07 17:49:49 +00:00
extern cvar_t r_softwarebanding_cvar ;
extern qboolean r_softwarebanding ;
2016-11-20 20:52:41 +00:00
extern cvar_t r_lightprepass_cvar ;
extern int r_lightprepass ; //0=off,1=16bit,2=32bit
2004-08-23 00:15:46 +00:00
extern cvar_t r_xflip ;
2016-10-22 07:06:51 +00:00
extern cvar_t gl_mindist , gl_maxdist ;
2010-11-11 18:22:49 +00:00
extern cvar_t r_clear ;
2020-04-19 01:23:32 +00:00
extern cvar_t r_clearcolour ;
2004-08-23 00:15:46 +00:00
extern cvar_t gl_poly ;
extern cvar_t gl_affinemodels ;
2015-07-14 14:47:00 +00:00
extern cvar_t r_renderscale ;
2008-07-16 00:19:33 +00:00
extern cvar_t gl_nohwblend ;
2019-02-16 19:09:07 +00:00
extern cvar_t r_coronas , r_coronas_intensity , r_coronas_occlusion , r_coronas_mindist , r_coronas_fadedist , r_flashblend , r_flashblendscale ;
2005-06-22 17:10:13 +00:00
extern cvar_t r_lightstylesmooth ;
2011-04-20 23:05:45 +00:00
extern cvar_t r_lightstylesmooth_limit ;
2005-06-22 17:10:13 +00:00
extern cvar_t r_lightstylespeed ;
2015-04-14 23:12:17 +00:00
extern cvar_t r_lightstylescale ;
2017-08-29 02:29:06 +00:00
extern cvar_t r_lightmap_scale ;
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
2004-08-23 00:15:46 +00:00
extern cvar_t gl_nocolors ;
2018-03-04 14:41:16 +00:00
# endif
2004-08-23 00:15:46 +00:00
extern cvar_t gl_load24bit ;
extern cvar_t gl_finish ;
extern cvar_t gl_max_size ;
extern cvar_t gl_playermip ;
2004-09-07 23:15:55 +00:00
2005-05-18 01:40:01 +00:00
extern cvar_t r_lightmap_saturation ;
2004-12-15 17:44:42 +00:00
2022-05-28 17:58:53 +00:00
# ifdef FTEPLUGIN //evil hack... boo hiss.
extern cvar_t * cvar_r_meshpitch ;
extern cvar_t * cvar_r_meshroll ;
# define r_meshpitch (*cvar_r_meshpitch)
# define r_meshroll (*cvar_r_meshroll)
# else
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
extern cvar_t r_meshpitch ;
2020-10-06 03:17:28 +00:00
extern cvar_t r_meshroll ; //gah!
2022-05-28 17:58:53 +00:00
# endif
2017-08-29 04:46:53 +00:00
extern cvar_t vid_hardwaregamma ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
2004-12-15 17:44:42 +00:00
enum {
RSPEED_TOTALREFRESH ,
2017-08-29 02:29:06 +00:00
RSPEED_CSQCPHYSICS ,
RSPEED_CSQCREDRAW ,
2005-04-16 16:21:27 +00:00
RSPEED_LINKENTITIES ,
2004-12-15 17:44:42 +00:00
RSPEED_WORLDNODE ,
RSPEED_DYNAMIC ,
2017-08-29 02:29:06 +00:00
RSPEED_OPAQUE ,
RSPEED_RTLIGHTS ,
RSPEED_TRANSPARENTS ,
RSPEED_PROTOCOL ,
2004-12-15 17:44:42 +00:00
RSPEED_PARTICLES ,
RSPEED_PARTICLESDRAW ,
RSPEED_PALETTEFLASHES ,
RSPEED_2D ,
RSPEED_SERVER ,
2023-04-17 02:53:35 +00:00
RSPEED_AUDIO ,
2016-07-12 00:40:13 +00:00
RSPEED_SETUP ,
RSPEED_SUBMIT ,
RSPEED_PRESENT ,
2016-07-21 19:27:59 +00:00
RSPEED_ACQUIRE ,
2004-12-15 17:44:42 +00:00
RSPEED_MAX
} ;
2013-03-12 23:09:25 +00:00
extern int rspeeds [ RSPEED_MAX ] ;
2004-12-15 17:44:42 +00:00
enum {
RQUANT_MSECS , //old r_speeds
2015-03-03 00:14:43 +00:00
RQUANT_PRIMITIVEINDICIES ,
2011-02-25 04:22:14 +00:00
RQUANT_DRAWS ,
RQUANT_ENTBATCHES ,
RQUANT_WORLDBATCHES ,
RQUANT_2DBATCHES ,
2013-10-08 14:28:11 +00:00
2015-03-03 00:14:43 +00:00
RQUANT_SHADOWINDICIES ,
2004-12-15 17:44:42 +00:00
RQUANT_SHADOWEDGES ,
2013-10-08 14:28:11 +00:00
RQUANT_SHADOWSIDES ,
2004-12-15 17:44:42 +00:00
RQUANT_LITFACES ,
2013-10-08 14:28:11 +00:00
RQUANT_RTLIGHT_DRAWN ,
RQUANT_RTLIGHT_CULL_FRUSTUM ,
RQUANT_RTLIGHT_CULL_PVS ,
RQUANT_RTLIGHT_CULL_SCISSOR ,
2004-12-15 17:44:42 +00:00
RQUANT_MAX
} ;
2013-03-12 23:09:25 +00:00
extern int rquant [ RQUANT_MAX ] ;
2004-12-15 17:44:42 +00:00
2011-02-25 04:22:14 +00:00
# define RQuantAdd(type,quant) rquant[type] += quant
2004-12-15 17:44:42 +00:00
2016-07-12 00:40:13 +00:00
#if 0 //defined(NDEBUG) || !defined(_WIN32)
2010-07-11 02:22:39 +00:00
# define RSpeedLocals()
# define RSpeedMark()
# define RSpeedRemark()
# define RSpeedEnd(spt)
# else
2015-04-14 23:12:17 +00:00
# define RSpeedLocals() double rsp
# define RSpeedMark() double rsp = (r_speeds.ival>1)?Sys_DoubleTime()*1000000:0
2011-02-25 04:22:14 +00:00
# define RSpeedRemark() rsp = (r_speeds.ival>1)?Sys_DoubleTime()*1000000:0
2005-05-13 10:42:48 +00:00
2009-11-04 21:16:50 +00:00
# if defined(_WIN32) && defined(GLQUAKE)
extern void ( _stdcall * qglFinish ) ( void ) ;
2015-04-14 23:12:17 +00:00
# define RSpeedEnd(spt) do {if(r_speeds.ival > 1){if(r_speeds.ival > 2 && qglFinish)qglFinish(); rspeeds[spt] += (double)(Sys_DoubleTime()*1000000) - rsp;}}while (0)
2009-11-04 21:16:50 +00:00
# else
2011-02-25 04:22:14 +00:00
# define RSpeedEnd(spt) rspeeds[spt] += (r_speeds.ival>1)?Sys_DoubleTime()*1000000 - rsp:0
2009-11-04 21:16:50 +00:00
# endif
2010-07-11 10:53:13 +00:00
# endif