Commit graph

931 commits

Author SHA1 Message Date
Bill Currie
60ca9854aa dead code removal 2004-03-19 21:12:12 +00:00
Bill Currie
78fd6d2513 minor cleanup of window position handling. hopefully no more window off
screen issues (wait for ConfigureNotify instead of MapNotify on window
creation (ConfigureNotify gives us our window position)).
2004-03-19 20:24:26 +00:00
Bill Currie
9099baeb6d minor cleanups preparing for an overhaul 2004-03-18 06:05:59 +00:00
Bill Currie
4f79d8ce0a hopefully more correct surface marking for dlights 2004-03-17 04:53:10 +00:00
Bill Currie
6c1c39c4d2 don't fudge the maxdist by 0.75. no clue why that was done, but it was the
cause of the bogusly lit surfaces (not sure why, though. imaginary numbers,
maybe?). timedemo runs are a little more variable :/
2004-03-17 04:47:55 +00:00
Bill Currie
e24cbd75e0 M_BUTTON6 and M_BUTTON7. nuff said :) 2004-03-16 04:12:28 +00:00
Ragnvald Maartmann-Moe IV
509cd09491 Make nearer cloud layer speed more sane for skydomes. 2004-03-15 21:45:45 +00:00
Ragnvald Maartmann-Moe IV
6c6047ccb8 Fix from Grievre. 2004-03-15 21:44:56 +00:00
Ragnvald Maartmann-Moe IV
29502c8f5a Lots of optimizations, particularly for GL state changes, and tweak lighting a
bit more.

Also a cleanup from Grievre: Use VectorIsZero in two places in gl_mod_alias.c.
2004-03-15 21:32:19 +00:00
Ragnvald Maartmann-Moe IV
1fe06c326b More of my experimental GL lighting tweaks. 2004-03-11 01:03:51 +00:00
Ragnvald Maartmann-Moe IV
9cd16b8dfd Grievre's lighting patch, plus some of my own changes.
My changes:
Emit normals if truform is enabled.
Attempt to avoid 0,0,0 normals (makes lighting & tesselation unhappy).
Fix some (ancient) apparent bugs in GetAliasFrameVerts16().
Clamp minlight, instead of adding it.
Apply colormod as glColor, rather than adding it to emission, to prevent QSG2
 issues with fullbrights.
Rearrange init code, and don't go quite as wild with responsiveness to lights.

Material & lightmode settings will need tweaking & testing to work well on all
 cards. Feedback needed there.
2004-03-10 08:14:38 +00:00
Chris Ison
68a1a50f1f fix for gl_overbright init order bug, maybe Despair can come up with a better way 2004-03-08 18:42:42 +00:00
Ragnvald Maartmann-Moe IV
b7df0b5278 Remove gl_doublebright, remove fractional overbrights, clean up init a bit,
uglify init a bit. Stuff for taniwha to look at. Nothing to see here, move
along.
2004-03-07 23:51:29 +00:00
Bill Currie
cd1fc18ea4 gl_lightmap_subimage 2 now works, but only if using r_lightmap_components 4
(with dri, anyway, ymmv).
2004-03-05 21:53:34 +00:00
Bill Currie
37024a4419 final (?) cleanup of center printing. turns out there's no reason to keep
it in the renderer and every reason to pull it out (ok, some might
disagree:)
2004-03-02 03:55:18 +00:00
Bill Currie
39fc0fe721 more centerprint cleanup. 2004-03-02 00:58:13 +00:00
Bill Currie
2955fac550 first step of centerprint/finale cleanup. fixes the misplaced text for
end-of-episode text
2004-03-01 23:47:39 +00:00
Ragnvald Maartmann-Moe IV
7b5535cb8f Less surprising default. 2004-02-29 05:32:23 +00:00
Ragnvald Maartmann-Moe IV
58d67f9a75 Lighting init fixes. 2004-02-29 04:50:01 +00:00
Ragnvald Maartmann-Moe IV
fde6e5bf61 Reduce ifs a bit, clean up init a bit. Minor problem with gl_doublebright. LIH. 2004-02-29 01:49:41 +00:00
Ragnvald Maartmann-Moe IV
e29e469646 Multitexture state fix. Harmless so far, but testing carefully helps us avoid
state leak horrors.
2004-02-27 21:42:52 +00:00
Ragnvald Maartmann-Moe IV
8c6cc34f83 Fix overzealous optimization which did interesting things to lightmapping when
not using multitexture.
2004-02-27 21:36:41 +00:00
Ragnvald Maartmann-Moe IV
28fda91e8c If (!var) checking for a cvar setup. Can't believe that one slipped by for so
long... Also set a few globals static.
2004-02-27 20:40:26 +00:00
Ragnvald Maartmann-Moe IV
cdb02edc88 Make whitespace consistent. yay. 2004-02-27 15:49:15 +00:00
Ragnvald Maartmann-Moe IV
6059c7b4df ...space 2004-02-27 08:51:26 +00:00
Ragnvald Maartmann-Moe IV
997f5feabe Tiny bit of loop unrolling. 2004-02-27 08:29:56 +00:00
Bill Currie
3855a8e40c seem to have the itterative world rendering working now (fingers crossed:) 2004-02-26 22:53:30 +00:00
Bill Currie
228c5a0ecf don't bother binding unmodified lightmaps 2004-02-26 00:33:24 +00:00
Ragnvald Maartmann-Moe IV
beeb1822b3 Fix multipass skydome rendering. Not sure layer speeds are right, but at least
they move at different speeds like they are supposed to.
2004-02-24 20:53:09 +00:00
Ragnvald Maartmann-Moe IV
44c89c1904 Optimize fullbright testing for brushes, assorted other cleanups, test for
functions built into current GL drivers, as well as the old extensions, and
add incorrectly rendering BGRA support.
Whee!
2004-02-24 20:50:55 +00:00
Bill Currie
f9b95cee92 some micro-optimisations 2004-02-23 07:17:41 +00:00
Bill Currie
680c246e22 the inline went wandering by mistake. gives a tiny (< 0.5%) gain, but a
gain none the less
2004-02-23 04:46:55 +00:00
Ragnvald Maartmann-Moe IV
496025473c Remove no-longer needed parameters from function calls. 2004-02-23 04:25:53 +00:00
Ragnvald Maartmann-Moe IV
872498a1f0 Reorder a lot of code, removing tons of ifs. multitexture paths are a bit more
sane now. Also optimize QSG2 color handling, and fix some QSG2 bugs. Not that
anyone cares, nobody uses it anyways.
Should be faster, but isn't here. *grmbl*
2004-02-22 06:00:15 +00:00
Chris Ison
e9d57e0401 Grievres' non-mtex FB being brighter than mtex FB fix. Note: it breaks non-RGBA replacement textures 2004-02-21 10:33:43 +00:00
Chris Ison
ca6112767c Grievres' water HOM and mtex FB only rendering FB texture fix 2004-02-21 09:04:52 +00:00
Ragnvald Maartmann-Moe IV
5157f668ad Fix a bunch of state leaks that made multitextured fullbrights smear the world.
Now just have one (known) issue with bmodels with fullbright textures not
rendering their base texture. Floating fullbrights are nifty!

Also a number of optimizations, which need wider performance testing.
2004-02-21 05:36:19 +00:00
Bill Currie
551c7ee89a Grievre's patch to makes R_MarkLights and R_RecursiveMarkLights use the
same function for actual marking.. which reduces code redundancy and fixes
the fact that world submodels
2004-02-21 04:23:00 +00:00
Ragnvald Maartmann-Moe IV
1cd0ba3f8f Pale void. 2004-02-20 22:50:47 +00:00
Ragnvald Maartmann-Moe IV
79689baa83 Grievre's crash fix. 2004-02-15 19:56:28 +00:00
Ragnvald Maartmann-Moe IV
e43129316b Slightly reorder cases for legibility. (decreasing order instead of random). 2004-02-15 19:55:59 +00:00
Bill Currie
2d2173dc4e make R_RecursiveWorldNode non-recursive (needs a new name, now :). 0.4%
speedup in null-renderer gl: unknown for sw and sw32 (could be slightly
slower, left recursive version in but #if 0ed out jic)
2004-02-15 03:46:55 +00:00
Chris Ison
6642686e33 removal of legacy MGL block_drawing variable. Fixed window restore bug that prevented the screen from being updated. 2004-02-15 03:40:50 +00:00
Ragnvald Maartmann-Moe IV
fef9b30bd7 QF, now complete with underbrights, thanks to Grievre.
Play with gl_overbright and gl_doublebright. That's an order.
2004-02-15 00:02:04 +00:00
Ragnvald Maartmann-Moe IV
0dae958a5a Grievre's fix for texture state leak. 2004-02-14 19:17:51 +00:00
Timothy C. McGrath
b5b61d056f Grievre passed a one line patch to me which according to his description:
"Fixes a bug in dynamic lights (lightstyles weren't being rendered correctly
due to bad assumptions about dlightbits)"

It compiles fine, and seems to work, so, here it is.

Hikaru
2004-02-14 08:36:08 +00:00
Bill Currie
64c156653f should fix the seg on ^C early in the startup 2004-02-14 07:53:49 +00:00
Bill Currie
d35f027757 undo my incorrect commit 2004-02-14 07:39:43 +00:00
Bill Currie
0e8ba7cc12 oops, committed the wrong file 2004-02-14 07:38:01 +00:00
Bill Currie
2cdf12cd50 if a leaf isn't in the frustum, don't bother lighting it 2004-02-14 07:32:26 +00:00
Bill Currie
85a268c62f Grievre's lightmap/fullbright multitexture patch (fbs not tested due to
lack of drivers supporting 3 tmus)
2004-02-14 05:10:29 +00:00
Bill Currie
a97b722d7b get the placement of the nice crosshairs right. make cs_data a square to
avoid weird mapping effects
2004-02-14 00:18:22 +00:00
Bill Currie
f34335a0c9 provide a builtin to draw a crosshair. 2004-02-13 23:16:33 +00:00
Bill Currie
4cabb40303 break the crosshair draw code into separate functions and give sw and sw32
crosshair 3
2004-02-13 22:16:53 +00:00
Ragnvald Maartmann-Moe IV
88c5d21ece Whitespace, slight code reorder in gl_rmain.c 2004-02-09 04:13:44 +00:00
Ragnvald Maartmann-Moe IV
372b763704 Inconsequential changes. 2004-02-09 04:11:13 +00:00
Ragnvald Maartmann-Moe IV
654cc35482 Mysteriously uncommitted. Fixed. 2004-02-09 04:02:08 +00:00
Ragnvald Maartmann-Moe IV
c4402e07bd Working towards merging q2 model, sprite, and map support. Check back in a few
years, might be finished. ;)
2004-02-08 02:49:38 +00:00
Bill Currie
8ea7690530 serious cleanup of refdef calculations. 2004-02-08 00:37:11 +00:00
Bill Currie
a45981bc6a don't look up the gl functions until after the context has been setup, just
incase it affects which functions glGetProcAddress actually returns.
2004-02-06 00:58:35 +00:00
Bill Currie
9784ba5954 Grievre's gamedir callback patch to fix mangled sounds on gamedir change
plus a couple minor tweaks I notcied needed doing.
2004-02-03 03:01:06 +00:00
Ragnvald Maartmann-Moe IV
0e6681a069 Add QFGL_WANT, and ability to handle non-required extensions. 2004-01-28 02:49:57 +00:00
Ragnvald Maartmann-Moe IV
31aca31d17 Warn users if their system doesn't support GL_ATI_pn_triangles. 2004-01-26 03:58:19 +00:00
Ragnvald Maartmann-Moe IV
767b0c61db Fix help for gl_tessellate cvar. 2004-01-26 00:40:31 +00:00
Ragnvald Maartmann-Moe IV
e1146a541c TruForm support. Controlled by gl_tessellate 2004-01-26 00:13:47 +00:00
Bill Currie
283d49bd8e first chunk of Mike Gorchak's <mike@malva.ua> QNX patches 2004-01-20 05:57:39 +00:00
Bill Currie
e154c9add5 be consistent with WIN32 and _WIN32 (now all _WIN32) 2004-01-20 03:47:27 +00:00
Bill Currie
77b2942982 several libs can now get built as dlls in windows: console, gamecode,
gamecode_builtins, gib, image, modules, object, ruamoko and util.
2004-01-19 07:47:41 +00:00
Bill Currie
e0567f75cc it seems ATI's libGL needs to be loaded with global symbols in order to
work properly.
2004-01-09 23:37:04 +00:00
Bill Currie
acd54afff7 move to using a hash table for builtin number -> builtin lookup so sparse
ranges can be used efficiently. move the auto-allocated builtins to
0x10000000-0x7fffffff. should be more than enough :)

use static builtin tables ("nul" terminated) instead of a series of
function calls to add builtins to a vm. should be more memory efficient.
2004-01-06 05:51:09 +00:00
Ragnvald Maartmann-Moe IV
a87fc16d12 Whitespace. 2004-01-06 03:38:48 +00:00
Ragnvald Maartmann-Moe IV
067080296c Futureproofing. 2004-01-06 03:38:16 +00:00
Bill Currie
40b8974c33 better external skin handling from Grievre 2003-12-28 05:25:06 +00:00
Ragnvald Maartmann-Moe IV
9dbb8335f6 Fix loading of some sky textures. 2003-12-23 22:24:48 +00:00
Bill Currie
e53967b346 --disable-static now works (thanks for the heads-up, raorn) 2003-12-22 20:51:08 +00:00
Bill Currie
069ee8657f fix a typo that prevented the asm lib getting the correct flags 2003-12-22 19:59:33 +00:00
Ragnvald Maartmann-Moe IV
bcf3738c1c Make trails in sw renderers const-friendly. 2003-10-23 03:53:59 +00:00
Ragnvald Maartmann-Moe IV
1269241612 Make particle effects not mess with stuff they shouldn't. Also fix an
improperly declared variable.
2003-10-22 22:21:39 +00:00
Ragnvald Maartmann-Moe IV
2290ed3d3e l = 64, and taniwha is much happier. 2003-10-22 20:20:24 +00:00
Ragnvald Maartmann-Moe IV
5686ff51e5 Make R_DarkFieldParticles & R_EntityParticles work in all renderers. 2003-10-22 06:00:36 +00:00
Ragnvald Maartmann-Moe IV
0205a8a999 Optimize and slightly clean up R_DarkFieldParticles & R_EntityParticles. 2003-10-22 01:04:35 +00:00
Ragnvald Maartmann-Moe IV
dc84232079 Whitespace, remove misleading .png extension from external conchars loader. 2003-09-20 04:29:42 +00:00
Bill Currie
d699926e6f external conchars patch from DrSpliff 2003-09-19 06:22:02 +00:00
Bill Currie
89586e0181 don't flush garbage to the screen on the first render frame 2003-09-05 06:55:12 +00:00
Bill Currie
3a8cfb050e fix alpha blending in 2d mode when 3d has never been rendered 2003-09-05 06:48:03 +00:00
Bill Currie
6b036d14ed in_mouse_accel patch from qize@gmx.net 2003-09-04 22:29:40 +00:00
Bill Currie
2b5a3753ca nuke QF/texture.h moving it's contents into QF/image.h (yay, finally, a
real home for tex_t:)
2003-09-04 18:59:39 +00:00
Bill Currie
39ed540979 LoadImage is now used for all external textures giving almost transparent
.png and .tga support.
2003-09-04 18:46:59 +00:00
Bill Currie
8db2660a4c make GL_LoadTexture support RGB textures (ie, 24 bit). I'm not happy with
the solution, but at least it works.
2003-09-04 05:22:23 +00:00
Bill Currie
0a8867fde9 replace all VectorSubtract (vec3_origin, ... and
VectorCopy (vec3_origin, ... with VectorNegate (... and VectorZero (...,
respectively. Should be a small speedup.
2003-09-03 22:17:04 +00:00
Bill Currie
f7b1196b8d fix the gl stack overflow (and make sure all skybrush surfaces get checked
and queued)
2003-08-28 19:50:28 +00:00
Bill Currie
2c30939891 remove some magic numbers (sloppy coder:P) 2003-08-28 02:24:08 +00:00
Bill Currie
93327cb618 try to fix segfault caused by VID_Shutdown getting called before VID_Init
(error conditions).
2003-08-27 22:50:39 +00:00
Ragnvald Maartmann-Moe IV
c2053fbfb1 Prettier particles! Renderer is now informed of sv_gravity changes in qw. Not
supportable without protocol changes in nq.
2003-08-27 22:20:03 +00:00
Bill Currie
415fae8d6b make the two normals arrays consistent 2003-08-26 07:00:13 +00:00
Ragnvald Maartmann-Moe IV
d8068de4fa Commit experimental particle optimization. Reduces random particles from using
6 15 bit rand() to 2 calls, with 5 bits for each of the 6.
This is up to a 1% speedup for qf particles, and up to 2.1% for id.

It may particularly affect explosions with r_particles_style 0.
Please report any anomolies in any particle effects.
2003-08-15 20:26:09 +00:00
Bill Currie
33a57c5a14 win32 compile fixes 2003-08-13 18:17:30 +00:00
Ragnvald Maartmann-Moe IV
9ed8150b85 More particle optimizations. 2003-08-11 20:48:34 +00:00
Bill Currie
7ead5a91f8 don't let gcc automaticly inline functions but make gcc inline bigger
functions when told to. also make gcc warn if it can't inline a function.

Explicitly inline several functions (including moving VectorNormalize to
mathlib.h so it /can/ be) resulting in a 5.5% speedup for spam2 (88 to 92
fps)
2003-08-11 06:05:07 +00:00
Bill Currie
b88d275994 fix some warnings 2003-08-11 05:16:04 +00:00