xonotic/darkplaces.git
8 years agocrypto: avoid generating control-like packets
divverent [Tue, 19 Apr 2011 15:31:26 +0000 (15:31 +0000)]
crypto: avoid generating control-like packets

In non-AES mode, we now replace packets whose hash starts with FFFFFFFF by
7FFFFFFF, and 8000LLLL by 0000LLLL. When decoding, packets with these prefixes
have two attempts.

AES encrypted mode is unaffected by this, as there packets always start with a
byte from 00 to 0F.

Also, no longer whine about receiving packets that fail the HMAC test when the
packets look like control packets (the NQ CONNECT packet DP sends when
connecting sometimes was received in time for this to match).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11068 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodisabled glBegin, glEnd, glPolygonMode wrapper functions in GLES2 init
havoc [Mon, 18 Apr 2011 16:16:15 +0000 (16:16 +0000)]
disabled glBegin, glEnd, glPolygonMode wrapper functions in GLES2 init
because the r_showtris/r_shownormals code now checks if these are NULL

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11067 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded RENDERPATH_GLES1
havoc [Mon, 18 Apr 2011 16:09:41 +0000 (16:09 +0000)]
added RENDERPATH_GLES1

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11066 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix typo in last commit
havoc [Mon, 18 Apr 2011 16:07:13 +0000 (16:07 +0000)]
fix typo in last commit

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11065 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomove iphone detection above macosx detection
havoc [Mon, 18 Apr 2011 15:38:32 +0000 (15:38 +0000)]
move iphone detection above macosx detection

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11064 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoseparate out the GLES2 stuff from the iphone stuff
havoc [Mon, 18 Apr 2011 15:35:46 +0000 (15:35 +0000)]
separate out the GLES2 stuff from the iphone stuff

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11063 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomade r_showoverdraw honor material face culling settings
havoc [Sun, 17 Apr 2011 20:05:27 +0000 (20:05 +0000)]
made r_showoverdraw honor material face culling settings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11062 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded r_showoverdraw cvar which allows you to see how many draws per
havoc [Sun, 17 Apr 2011 18:22:30 +0000 (18:22 +0000)]
added r_showoverdraw cvar which allows you to see how many draws per
pixel, white = 8 surfaces on the pixel (can be varied by changing cvar
to 0.5 or similar)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11061 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix cullentities trace on q1bsp, it was broken by the
havoc [Sun, 17 Apr 2011 18:07:58 +0000 (18:07 +0000)]
fix cullentities trace on q1bsp, it was broken by the
TraceLineAgainstSurfaces patch

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11060 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoundo an accidental r_test commit in vid_sdl.c
havoc [Thu, 14 Apr 2011 17:33:02 +0000 (17:33 +0000)]
undo an accidental r_test commit in vid_sdl.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11059 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomake dpoffsetscale apply again
divverent [Wed, 13 Apr 2011 19:24:39 +0000 (19:24 +0000)]
make dpoffsetscale apply again

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11058 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix a typo causing moire with offsetmapping
divverent [Wed, 13 Apr 2011 17:05:59 +0000 (17:05 +0000)]
fix a typo causing moire with offsetmapping

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11057 d7cf8633-e32d-0410-b094-e92efae38249

8 years agonew cvar: r_glsl_offsetmapping_reliefmapping_refinesteps (default 5)
divverent [Wed, 13 Apr 2011 16:07:26 +0000 (16:07 +0000)]
new cvar: r_glsl_offsetmapping_reliefmapping_refinesteps (default 5)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11056 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix loading "g"-less .obj files
divverent [Tue, 12 Apr 2011 20:34:40 +0000 (20:34 +0000)]
fix loading "g"-less .obj files

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11055 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoavoid some crashes when recursing BIHs
divverent [Tue, 12 Apr 2011 20:05:04 +0000 (20:05 +0000)]
avoid some crashes when recursing BIHs

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11054 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix a typo
havoc [Tue, 12 Apr 2011 14:10:10 +0000 (14:10 +0000)]
fix a typo

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11053 d7cf8633-e32d-0410-b094-e92efae38249

8 years agooops, fix last fix
divverent [Tue, 12 Apr 2011 05:12:58 +0000 (05:12 +0000)]
oops, fix last fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11052 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix an engine crash in vid_glx
divverent [Tue, 12 Apr 2011 04:53:57 +0000 (04:53 +0000)]
fix an engine crash in vid_glx

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11051 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix mingw breakage on Ubuntu
divverent [Mon, 11 Apr 2011 06:51:56 +0000 (06:51 +0000)]
fix mingw breakage on Ubuntu

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11050 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoremove the never-finished first incarnation of obj loading code, the
havoc [Mon, 11 Apr 2011 05:18:12 +0000 (05:18 +0000)]
remove the never-finished first incarnation of obj loading code, the
second incarnation is alive and well

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11049 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix compilation of dpsoftrast on mingw32 (use Interlocked* instead of __sync_*)
divverent [Sun, 10 Apr 2011 19:23:57 +0000 (19:23 +0000)]
fix compilation of dpsoftrast on mingw32 (use Interlocked* instead of __sync_*)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11048 d7cf8633-e32d-0410-b094-e92efae38249

8 years agobreak the net connection AFTER calling ClientDisconnect; this fixes issues with clien...
divverent [Sun, 10 Apr 2011 19:07:28 +0000 (19:07 +0000)]
break the net connection AFTER calling ClientDisconnect; this fixes issues with clienttype(self) in ClientDisconnect

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11047 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodon't infinite loop if a sound has total_length 0
havoc [Sun, 10 Apr 2011 16:00:21 +0000 (16:00 +0000)]
don't infinite loop if a sound has total_length 0

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11046 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoimplemented support for GL_EXT_texture_sRGB to preserve precision if
havoc [Sun, 10 Apr 2011 12:50:11 +0000 (12:50 +0000)]
implemented support for GL_EXT_texture_sRGB to preserve precision if
supported (otherwise it just converts to linear and uses regular texture
formats)
renamed r_texture_convertsRGB_ cvars to r_texture_sRGB_ and broke out
the individual skin textures as separate cvars
added vid.forcetextype which allows particular renderpaths to force
desired texture component layouts (GL_RGBA for GLES, otherwise GL_BGRA)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11045 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix the same bugs as before in strireplace
divverent [Sun, 10 Apr 2011 05:26:56 +0000 (05:26 +0000)]
fix the same bugs as before in strireplace

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11044 d7cf8633-e32d-0410-b094-e92efae38249

8 years agor_showsurfaces 3: render sky (appears as average-colored box sides)
divverent [Sun, 10 Apr 2011 05:21:59 +0000 (05:21 +0000)]
r_showsurfaces 3: render sky (appears as average-colored box sides)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11043 d7cf8633-e32d-0410-b094-e92efae38249

8 years agocorrect a cvar comment now that directional shading uses 8x data
havoc [Sat, 9 Apr 2011 17:11:18 +0000 (17:11 +0000)]
correct a cvar comment now that directional shading uses 8x data

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11042 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoredesigned r_shadow_bouncegrid_static_directionalshading - it now uses 6
havoc [Sat, 9 Apr 2011 17:09:18 +0000 (17:09 +0000)]
redesigned r_shadow_bouncegrid_static_directionalshading - it now uses 6
vectors per pixel instead of 3, giving much more accurate shading
added r_shadow_bouncegrid_includedirectlighting cvar - if turned on this
enables direct lighting in the bouncegrid
cleaned up directionalshading code significantly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11041 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodon't use GL_RGBA internalformat on opaque textures (thanks to Rock for
havoc [Sat, 9 Apr 2011 04:17:36 +0000 (04:17 +0000)]
don't use GL_RGBA internalformat on opaque textures (thanks to Rock for
reporting this bug)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11040 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoclang has _mm_cvtss_f32 but not __builtin_ia32_vec_ext_v4sf
divverent [Fri, 8 Apr 2011 17:49:18 +0000 (17:49 +0000)]
clang has _mm_cvtss_f32 but not __builtin_ia32_vec_ext_v4sf

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11039 d7cf8633-e32d-0410-b094-e92efae38249

8 years agosome cleanup of offsetmapping setup code
havoc [Fri, 8 Apr 2011 16:38:11 +0000 (16:38 +0000)]
some cleanup of offsetmapping setup code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11038 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded mod_noshader_default_offsetmapping to allow separate control over
havoc [Fri, 8 Apr 2011 16:37:50 +0000 (16:37 +0000)]
added mod_noshader_default_offsetmapping to allow separate control over
external textures that have no q3 shader

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11037 d7cf8633-e32d-0410-b094-e92efae38249

8 years agowhen loading q1bsp textures, do not allow q3 shader loading to overwrite
havoc [Fri, 8 Apr 2011 16:10:44 +0000 (16:10 +0000)]
when loading q1bsp textures, do not allow q3 shader loading to overwrite
default parameters

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11036 d7cf8633-e32d-0410-b094-e92efae38249

8 years agorewrote mod_collision_bih tracing code, the functions are no longer
havoc [Fri, 8 Apr 2011 15:23:10 +0000 (15:23 +0000)]
rewrote mod_collision_bih tracing code, the functions are no longer
recursive (small speed boost), line traces are about 12% faster due to
more precise culling of leafs (the code is however huge and nasty), BIH
TraceBrush is now considerably faster due to the same techniques, it was
previously very unoptimized

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11035 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix multiple bugs in strreplace
divverent [Wed, 6 Apr 2011 20:24:30 +0000 (20:24 +0000)]
fix multiple bugs in strreplace

bug 1: if search string is empty, an endless loop occurs
bug 2: searching for "foo" in "fo" is actually found, and replaced!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11034 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomore concise version of Texture2DBGRA8
eihrul [Wed, 6 Apr 2011 16:37:31 +0000 (16:37 +0000)]
more concise version of Texture2DBGRA8

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11033 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoimplement MODE_WATER
divverent [Wed, 6 Apr 2011 16:32:03 +0000 (16:32 +0000)]
implement MODE_WATER

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11032 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomake MODE_REFRACTION not use TEXCOORD1..3 to help MODE_WATER use the same code
divverent [Wed, 6 Apr 2011 16:32:00 +0000 (16:32 +0000)]
make MODE_REFRACTION not use TEXCOORD1..3 to help MODE_WATER use the same code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11031 d7cf8633-e32d-0410-b094-e92efae38249

8 years agopreparation for MODE_WATER: refactor the pixel getting out of MODE_REFRACTION
divverent [Wed, 6 Apr 2011 15:26:08 +0000 (15:26 +0000)]
preparation for MODE_WATER: refactor the pixel getting out of MODE_REFRACTION

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11030 d7cf8633-e32d-0410-b094-e92efae38249

8 years agouse ASYNCBLIT by default
eihrul [Tue, 5 Apr 2011 18:40:01 +0000 (18:40 +0000)]
use ASYNCBLIT by default

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11029 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomake vid_glx also clear fullscreen properly
divverent [Tue, 5 Apr 2011 18:06:10 +0000 (18:06 +0000)]
make vid_glx also clear fullscreen properly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11028 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoonly use ONE buffer for non-Xshm
divverent [Tue, 5 Apr 2011 17:41:10 +0000 (17:41 +0000)]
only use ONE buffer for non-Xshm

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11027 d7cf8633-e32d-0410-b094-e92efae38249

8 years agosanity check the visual obtained
divverent [Tue, 5 Apr 2011 17:28:32 +0000 (17:28 +0000)]
sanity check the visual obtained

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11026 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoXShm and pthreads support for vid_glx dpsoftrast
divverent [Tue, 5 Apr 2011 17:19:56 +0000 (17:19 +0000)]
XShm and pthreads support for vid_glx dpsoftrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11025 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoworkaround for missing _mm_cvtss_f32 on some gcc versionsx
eihrul [Tue, 5 Apr 2011 08:57:38 +0000 (08:57 +0000)]
workaround for missing _mm_cvtss_f32 on some gcc versionsx

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11024 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded backface culling optimization to cl_decals_newsystem, this helps
havoc [Tue, 5 Apr 2011 07:51:52 +0000 (07:51 +0000)]
added backface culling optimization to cl_decals_newsystem, this helps
in many cases

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11023 d7cf8633-e32d-0410-b094-e92efae38249

8 years agooptimize scanning for 0 alpha in FinishBGRA8
eihrul [Mon, 4 Apr 2011 21:21:49 +0000 (21:21 +0000)]
optimize scanning for 0 alpha in FinishBGRA8

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11022 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoFinishBGRA8 optimization and fixes
eihrul [Mon, 4 Apr 2011 20:21:15 +0000 (20:21 +0000)]
FinishBGRA8 optimization and fixes

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11021 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix some clipping plane bugs and FinishBGRA8 bug introduced in r11015
eihrul [Mon, 4 Apr 2011 19:51:25 +0000 (19:51 +0000)]
fix some clipping plane bugs and FinishBGRA8 bug introduced in r11015

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11020 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoremoved unused function DPSOFTRAST_Draw_Span_Finish
havoc [Mon, 4 Apr 2011 15:47:46 +0000 (15:47 +0000)]
removed unused function DPSOFTRAST_Draw_Span_Finish
refactored parts of DPSOFTRAST_Draw_ProcessSpans into two functions -
DPSOFTRAST_Draw_DepthTest and DPSOFTRAST_Draw_DepthWrite
moved stack variable pixelmask to thread->pixelmaskarray
added depthbase and depthslope to span structure, computed at creation

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11019 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoclipplane validation fix
eihrul [Mon, 4 Apr 2011 14:53:06 +0000 (14:53 +0000)]
clipplane validation fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11018 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded simple affine check to accelerate texture fetches on 2D art
havoc [Mon, 4 Apr 2011 14:41:28 +0000 (14:41 +0000)]
added simple affine check to accelerate texture fetches on 2D art

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11017 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoinitial support for user clipping plane in dpsoftrast
eihrul [Mon, 4 Apr 2011 14:31:32 +0000 (14:31 +0000)]
initial support for user clipping plane in dpsoftrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11016 d7cf8633-e32d-0410-b094-e92efae38249

8 years agochanged pixelmask processing in DPSOFTRAST_Draw_Span_FinishBGRA8 to
havoc [Mon, 4 Apr 2011 12:30:15 +0000 (12:30 +0000)]
changed pixelmask processing in DPSOFTRAST_Draw_Span_FinishBGRA8 to
clear pixelmask values when doing alphablend if the pixels have zero
alpha, and also to use a double loop approach which removes the checks
from the blending inner loops...  this seems to have only a slight fps
gain in Quake though

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11015 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix flipped scissor coordinates in dpsoftrast render path
eihrul [Sat, 2 Apr 2011 20:29:18 +0000 (20:29 +0000)]
fix flipped scissor coordinates in dpsoftrast render path

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11014 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoslight optimization to 2D rendering - if triangle wslope is 0, don't
havoc [Sat, 2 Apr 2011 16:55:32 +0000 (16:55 +0000)]
slight optimization to 2D rendering - if triangle wslope is 0, don't
bother doing any math, just fill the zf array

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11013 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoenable SSE2 instructions when compiling dpsoftrast.c
havoc [Sat, 2 Apr 2011 04:38:13 +0000 (04:38 +0000)]
enable SSE2 instructions when compiling dpsoftrast.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11012 d7cf8633-e32d-0410-b094-e92efae38249

8 years agovery basic softrast support in vid_glx.c. VERY SLOW, as it doesn't use an Xtension...
divverent [Fri, 1 Apr 2011 23:07:04 +0000 (23:07 +0000)]
very basic softrast support in vid_glx.c. VERY SLOW, as it doesn't use an Xtension yet.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11011 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix the 0.5-fix
eihrul [Fri, 1 Apr 2011 21:05:36 +0000 (21:05 +0000)]
fix the 0.5-fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11010 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodpsoftrast: fix off-by-0.5 in GL_NEAREST
divverent [Fri, 1 Apr 2011 21:00:18 +0000 (21:00 +0000)]
dpsoftrast: fix off-by-0.5 in GL_NEAREST

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11009 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix texture filtering accuracy bugs in the C variant (12bit vs 16bit) in softrast
divverent [Fri, 1 Apr 2011 20:50:40 +0000 (20:50 +0000)]
fix texture filtering accuracy bugs in the C variant (12bit vs 16bit) in softrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11008 d7cf8633-e32d-0410-b094-e92efae38249

8 years agopossibly fix offset calc for infobar
divverent [Fri, 1 Apr 2011 20:16:53 +0000 (20:16 +0000)]
possibly fix offset calc for infobar

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11007 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix compilation when SSE2_PRESENT, also fix compilation without SSE_POSSIBLE
havoc [Fri, 1 Apr 2011 15:02:51 +0000 (15:02 +0000)]
fix compilation when SSE2_PRESENT, also fix compilation without SSE_POSSIBLE

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11006 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoWGL client can now use DPSOFTRAST, added thread_win.c to avoid SDL dependency for...
havoc [Fri, 1 Apr 2011 14:59:17 +0000 (14:59 +0000)]
WGL client can now use DPSOFTRAST, added thread_win.c to avoid SDL dependency for WGL client
added Sys_HaveSSE and Sys_HaveSSE2 functions in sys_shared.c and cleaned up that mess in model_alias.c
dpsoftrast now compiles if SSE_POSSIBLE rather than SSE2_PRESENT, and uses Sys_HaveSSE2 for runtime detection on x86

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11005 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix Vertex_BoundY params
eihrul [Fri, 1 Apr 2011 14:40:48 +0000 (14:40 +0000)]
fix Vertex_BoundY params

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11004 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded GL_Finish function in backend, to centralize all the qglFinish
havoc [Fri, 1 Apr 2011 09:40:57 +0000 (09:40 +0000)]
added GL_Finish function in backend, to centralize all the qglFinish
calls and accommodate other render paths in such cases

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11003 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofb validation fix
eihrul [Fri, 1 Apr 2011 09:09:10 +0000 (09:09 +0000)]
fb validation fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11002 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoenable gloss texture loading in GLES2 path
havoc [Fri, 1 Apr 2011 09:08:39 +0000 (09:08 +0000)]
enable gloss texture loading in GLES2 path

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11001 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomake r_hdr behave like r_bloom when r_viewfbo is on
havoc [Fri, 1 Apr 2011 08:42:00 +0000 (08:42 +0000)]
make r_hdr behave like r_bloom when r_viewfbo is on

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11000 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded support for dpsoftrast synchronization for fpsscaling
havoc [Fri, 1 Apr 2011 08:11:16 +0000 (08:11 +0000)]
added support for dpsoftrast synchronization for fpsscaling

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10999 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodon't crash on NULL texture upload in dpsoftrast
havoc [Fri, 1 Apr 2011 07:23:17 +0000 (07:23 +0000)]
don't crash on NULL texture upload in dpsoftrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10998 d7cf8633-e32d-0410-b094-e92efae38249

8 years agochanged default r_viewscale_fpsscaling_min from 0.25 (25% pixels, 50%
havoc [Fri, 1 Apr 2011 07:09:51 +0000 (07:09 +0000)]
changed default r_viewscale_fpsscaling_min from 0.25 (25% pixels, 50%
width/height) to 0.0625 (6.25% pixels, 25% width/height)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10997 d7cf8633-e32d-0410-b094-e92efae38249

8 years agochanged default r_viewscale_fpsscaling_target from 90 to 70, this still
havoc [Fri, 1 Apr 2011 07:06:28 +0000 (07:06 +0000)]
changed default r_viewscale_fpsscaling_target from 90 to 70, this still
works well with vid_vsync

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10996 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoreworked r_viewscale_fpsscaling to use the time of SCR_DrawScreen
havoc [Fri, 1 Apr 2011 07:04:58 +0000 (07:04 +0000)]
reworked r_viewscale_fpsscaling to use the time of SCR_DrawScreen
wrapped in glFinish calls (REALLY should use GL_EXT_timery_query), this
means that vid_vsync now works fine with it

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10995 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded r_viewscale_fpsscaling and various cvars for it, this enables
havoc [Fri, 1 Apr 2011 05:46:28 +0000 (05:46 +0000)]
added r_viewscale_fpsscaling and various cvars for it, this enables
variable resolution rendering based on framerate (does not work properly
with vsync)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10994 d7cf8633-e32d-0410-b094-e92efae38249

8 years agor_viewscale now works (with or without r_viewfbo), this allows reduced
havoc [Fri, 1 Apr 2011 01:04:12 +0000 (01:04 +0000)]
r_viewscale now works (with or without r_viewfbo), this allows reduced
resolution rendering for higher performance, at native screen
resolutions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10993 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoupload NULL textures as NULL textures, rather than creating a big array
havoc [Fri, 1 Apr 2011 01:03:30 +0000 (01:03 +0000)]
upload NULL textures as NULL textures, rather than creating a big array
of zeros to upload

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10992 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofixed viewsize issues with r_viewfbo
havoc [Thu, 31 Mar 2011 23:58:16 +0000 (23:58 +0000)]
fixed viewsize issues with r_viewfbo

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10991 d7cf8633-e32d-0410-b094-e92efae38249

8 years agosys_linux, sys_sdl: support options -noterminal and -stderr to define which fd gets...
divverent [Thu, 31 Mar 2011 18:14:20 +0000 (18:14 +0000)]
sys_linux, sys_sdl: support options -noterminal and -stderr to define which fd gets output. Helps when using vid_soft/SDL/libcaca/ncurses ;)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10990 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded r_viewfbo and r_viewscale cvars - the former allows use of
havoc [Thu, 31 Mar 2011 13:17:15 +0000 (13:17 +0000)]
added r_viewfbo and r_viewscale cvars - the former allows use of
GL_RGBA16F and GL_RGBA32F framebuffer rendering for 3D views (the main
refresh is not altered), the latter will allow scaling view rendering
resolution independently of video resolution, when implemented

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10989 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix the alpha bug in dpsoftrast.c
divverent [Wed, 30 Mar 2011 21:27:16 +0000 (21:27 +0000)]
fix the alpha bug in dpsoftrast.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10988 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoa fix for dpsoftrast refractions by eihrul
divverent [Wed, 30 Mar 2011 21:17:19 +0000 (21:17 +0000)]
a fix for dpsoftrast refractions by eihrul

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10987 d7cf8633-e32d-0410-b094-e92efae38249

8 years agostart implementing REFRACTION
divverent [Wed, 30 Mar 2011 21:17:16 +0000 (21:17 +0000)]
start implementing REFRACTION

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10986 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodpsoftrast: support r_shadow_glossexact
divverent [Wed, 30 Mar 2011 05:47:58 +0000 (05:47 +0000)]
dpsoftrast: support r_shadow_glossexact

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10985 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodpsoftrast: speed up deluxemapping a bit; support tangentspace deluxemapping too...
divverent [Wed, 30 Mar 2011 05:47:53 +0000 (05:47 +0000)]
dpsoftrast: speed up deluxemapping a bit; support tangentspace deluxemapping too; support fakelight too

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10984 d7cf8633-e32d-0410-b094-e92efae38249

8 years agor_shadow_deferred now checks for r_shadow_gloss 0 and does not use the
havoc [Tue, 29 Mar 2011 23:15:08 +0000 (23:15 +0000)]
r_shadow_deferred now checks for r_shadow_gloss 0 and does not use the
second color attachment if so, giving a modest speed boost for testing
but deferred is still way too slow for practical use even with this...

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10983 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix bouncegrid intensity so it reacts to r_hdr_scenebrightness and r_hdr
havoc [Tue, 29 Mar 2011 22:40:25 +0000 (22:40 +0000)]
fix bouncegrid intensity so it reacts to r_hdr_scenebrightness and r_hdr

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10982 d7cf8633-e32d-0410-b094-e92efae38249

8 years agohush some unrecognized SDL event type warnings
havoc [Tue, 29 Mar 2011 01:32:20 +0000 (01:32 +0000)]
hush some unrecognized SDL event type warnings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10981 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded joy_axiskeyevents_deadzone cvar which makes the arrow key
havoc [Mon, 28 Mar 2011 23:00:30 +0000 (23:00 +0000)]
added joy_axiskeyevents_deadzone cvar which makes the arrow key
emulation far less sensitive

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10980 d7cf8633-e32d-0410-b094-e92efae38249

8 years agomake sure collision cache parameter struct is the same every frame by
havoc [Mon, 28 Mar 2011 11:48:21 +0000 (11:48 +0000)]
make sure collision cache parameter struct is the same every frame by
using memset first

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10979 d7cf8633-e32d-0410-b094-e92efae38249

8 years agor_shadow_bouncegrid_particleintensity changed from 2 to 1 because it was
havoc [Mon, 28 Mar 2011 11:36:41 +0000 (11:36 +0000)]
r_shadow_bouncegrid_particleintensity changed from 2 to 1 because it was
overwhelming (still is quite bright...)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10978 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix some warnings
havoc [Mon, 28 Mar 2011 10:48:22 +0000 (10:48 +0000)]
fix some warnings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10977 d7cf8633-e32d-0410-b094-e92efae38249

8 years agorestore the active rtlights check in bouncegrid
havoc [Mon, 28 Mar 2011 10:47:53 +0000 (10:47 +0000)]
restore the active rtlights check in bouncegrid
memset the bouncegrid settings struct to make it consistently pass the
memcmp check even if some bytes are not set
improved bouncegrid dynamic mode size check to compare pixel count
rather than individual dimensions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10976 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoremove check for active rtlights in bouncegrid because it was not
havoc [Mon, 28 Mar 2011 10:18:01 +0000 (10:18 +0000)]
remove check for active rtlights in bouncegrid because it was not
working

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10975 d7cf8633-e32d-0410-b094-e92efae38249

8 years agobetter detection of active rtlights in bouncegrid code
havoc [Mon, 28 Mar 2011 09:59:12 +0000 (09:59 +0000)]
better detection of active rtlights in bouncegrid code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10974 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodo not use light scissoring on deferred lighting mode, it often yields
havoc [Mon, 28 Mar 2011 07:16:34 +0000 (07:16 +0000)]
do not use light scissoring on deferred lighting mode, it often yields
strange artifacts on shadowless lights

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10973 d7cf8633-e32d-0410-b094-e92efae38249

8 years agodisallow r_shadow_bouncegrid on renderpaths that do not support it
havoc [Mon, 28 Mar 2011 07:15:19 +0000 (07:15 +0000)]
disallow r_shadow_bouncegrid on renderpaths that do not support it

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10972 d7cf8633-e32d-0410-b094-e92efae38249

8 years agoadded r_shadow_bouncegrid_static cvar which makes a proper static mode
havoc [Mon, 28 Mar 2011 06:56:32 +0000 (06:56 +0000)]
added r_shadow_bouncegrid_static cvar which makes a proper static mode
and this is now the default, its framerate cost is very low and it makes
realtime world lighting look nicer, tweaked all relevant cvars for this
detect whether any lights warrant bouncegrid each frame - this means
that the cvar could be defaulted on and still do nothing when realtime
world lighting is turned off

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10971 d7cf8633-e32d-0410-b094-e92efae38249

8 years agofix a crash in RSurf_DrawBatch_GL11_MakeFogColor
divverent [Sun, 27 Mar 2011 06:20:51 +0000 (06:20 +0000)]
fix a crash in RSurf_DrawBatch_GL11_MakeFogColor

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10970 d7cf8633-e32d-0410-b094-e92efae38249

8 years agolast commit was a bad fix - fix it correctly, preventing reliefmapping artifacts...
divverent [Sat, 26 Mar 2011 19:12:04 +0000 (19:12 +0000)]
last commit was a bad fix - fix it correctly, preventing reliefmapping artifacts on these pesky reflections

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10969 d7cf8633-e32d-0410-b094-e92efae38249