Commit graph

64 commits

Author SHA1 Message Date
Ragnvald Maartmann-Moe IV
986a610860 Make ifdef's more consistent (and follow CodingStyle), HAVE_* cleanups, make -ggi target compile again, little whitespace, and sorted includes. 2000-12-30 18:26:29 +00:00
Bill Currie
ccba39666b #include audit 2000-12-30 02:16:36 +00:00
Jeff Teunissen
54e2a4d9d3 Okay, the big whitespace reformat. There is some silliness (case
statements, variable declarations), but all in all it's not bad.
2000-12-08 06:51:37 +00:00
Bill Currie
97f7b9a568 rename quakedef.h to host.h (I should have done this months ago).
NOTE: -{sdl,sgl,3dfx,ggi,wgl,mgl} targets are very likely to be broken
if any file fails to compile, just put #include "host.h" into it
2000-12-05 06:33:44 +00:00
Zephaniah E. Hull
13bd5ce012 The init sequence cleanup!
Also broke up client.h into a lot of smaller headers.
Oh, software rendering works again.

And yes, this does hit a hell of a lot of files.
2000-10-29 15:35:24 +00:00
Ragnvald Maartmann-Moe IV
2f094cb344 Minor cleanup to window closing on exit. 2000-10-29 07:58:43 +00:00
Jeff Teunissen
5bb2a9002c Change fires to a more visually-appealing red-orange color. Looks *killer*
Add -brighten arg to GL targets, to replace -gamma but still look nice.
"-brighten 2.5" brightens the palette by 2.5 times, to give a similar
effect to the brightness cvar, but without the dithering brightness
gives. This is a palette hack, which means it _can't_ be a cvar.
2000-10-28 07:11:37 +00:00
Jeff Teunissen
0ec5c00c18 whitespace, some optimizations 2000-10-28 05:05:17 +00:00
Bill Currie
27465bc765 bring in Despair's (Ragnvald Maartmann-Moe IV, rmmiv@earthlink.net) clean up
of the gl setup code.
2000-10-26 06:08:09 +00:00
Jeff Teunissen
f7f968daeb -gamma removal 2000-10-23 10:26:43 +00:00
Bill Currie
1abb6fe74c fix the misaligned fullscreen window once and for all (fingers crossed:) 2000-10-22 07:14:47 +00:00
Bill Currie
499eaa2a7d cvar.c:
%g is no good :/
menu.c screen.c:
	float -> int cleanup for scr_viewsize
vid_glx.c:
	remove unused vid_mode cvar
2000-10-21 21:08:04 +00:00
Bill Currie
d295f183ba remove va from commdef.h and fix the consequences 2000-10-21 07:34:56 +00:00
Bill Currie
dcd1201131 create VID_GetWindowSize in vid.c and use it elsewhere for window size
selection.  in_x11.c just had refs to scr_width and scr_height removed.
2000-10-21 07:15:30 +00:00
Jeff Teunissen
e0a53aa9a2 cl_main.c: More VID_SetCaption status messages.
vid_*: Make it so that VID_SetCaption can be safely called with the output
from va()
2000-10-14 07:10:56 +00:00
Bill Currie
5314fb8cca remove uneeded (and prblematic) header 2000-10-10 23:18:30 +00:00
Bill Currie
c2a1e1f229 destroy the gl context BEFORE destroying the window. 2000-10-05 16:22:18 +00:00
Bill Currie
306cadad05 remove redundant refs to in_dga_mouseaccel 2000-10-05 15:27:14 +00:00
Bill Currie
065abe9464 make VID_SetCaption consistent wherever appropriate (ie possibly windowed
environments). caption is "PROGRAM VERSION[: text]".
2000-10-04 05:45:48 +00:00
Jeff Teunissen
85e0b2b6aa X11 targets have runtime caption setting now. 2000-10-03 07:10:48 +00:00
Zephaniah E. Hull
e4c9ccff8f Cvar audit 1, all unused cvars are gone, with the exception of software
rendering, and the server.
2000-09-30 04:08:40 +00:00
Zephaniah E. Hull
01a5c65e52 More cleanup, now working on the rendering line as a whole.
Con_SafePrintf is no longer needed, as Con_Printf is safe.
2000-09-29 19:29:22 +00:00
Zephaniah E. Hull
822453e3e2 Whoops, enable GL_BLEND on start. 2000-09-28 08:12:50 +00:00
Zephaniah E. Hull
383075bb39 More audit cleanups, glShadeModel this time, and gl_affinemodels does
what it says now, instead of the reverse of what it says.
2000-09-28 07:56:00 +00:00
Bill Currie
86f87122c0 zlib support (gzipped pack contents). if you have a probelm with gzgets, you
have 3 choices: remove /usr/X11R6/lib/libz.a, --diable-zlib, or fix configure.
I do intend on fixing it myself.
2000-09-27 19:44:26 +00:00
Bill Currie
9ece49b4e8 fix for Bug #105221 though it seems repeats were ignored anyway. this was done
by backporting the glx/x11 changes from nuq
2000-09-24 03:43:06 +00:00
Zephaniah E. Hull
210ba16069 First off in gl_draw.c we have some nice cleanup code for the upload
code.

Then we have the completely purge of treating 'unsigned' as a type, it
is NOT a type, it is a TYPE MODIFIER!

Under gcc for x86 it happens to try and do something sane, just treat it
as a unsigned int, but that is EVIL, it is a MODIFIER and if ANYONE adds
code which uses unsigned as a type in itself I /WILL/ harm them!!!
2000-09-22 09:08:08 +00:00
Bill Currie
858a0e5db2 Warp the cursor out of the way for 3dfx users. Hopefully this does the job. 2000-07-27 04:39:01 +00:00
Bill Currie
4f0e4c858a Move the mouse cursor hiding code from in_x11 to vid_{x11,glx} so it is
guaranteed to be done /before/ the glx context is created. Hopefully this
fixes knghtbrd's ugly cursor problem.
2000-07-27 03:37:41 +00:00
Dabb
b183d0dcaf VID_SetCaption (title) stubs - code added later. 2000-07-14 16:09:35 +00:00
Jeff Teunissen
ba47dca3aa SDL support in configure.in... it isn't turned into a target yet, but it
will be soon.
2000-07-11 05:05:27 +00:00
Brian Koropoff
01148e4ce9 This fixes a bug with nvidia cards that can cause other GL programs to run very slowly. Thanks to rpete for pointing out the problem. 2000-07-09 05:49:26 +00:00
Bill Currie
b25d03c602 source/vid_glx.c:
#if 0 the signal code. wouldn't compile otherwise, but not game to
	nuke it just yet
include/win32/version.h:
	buggered if I know. fscking configure/cvs :)
include/glquake.h:
	remove size declarations from bubble_sintable and bubble_costable
source/gl_part.c source/gl_rlight.c:
	32 segments in a circle now instead of 16 and change the pointer
	math to cope
source/gl_warp.c:
	nothing much. just almost double my fps. (hint: the above tables)
2000-06-29 09:21:23 +00:00
Zephaniah E. Hull
8e64d0d3cc Fixed the signal handling for x11 targets, specificly -x11..
(Yes, this required a change in the glx target, don't ask)
2000-06-26 17:20:38 +00:00
Bill Currie
d75f6944c1 make XRaiseWindow happen unconditionally. Should help with qf not always
getting focus on v3.
2000-06-26 10:38:41 +00:00
Joseph Carter
32b13fb303 gl_finish - it's done
gl_ztrick - here's the hat, but no rabbit

considering that a buggy driver can make gl_ztrick into a sort of cheat if
you can stand the flicker, it's gone.  gl_finish was already a zombie Cvar
so I just removed its definition.
2000-06-17 13:30:39 +00:00
Joseph Carter
3287c0e38b ARB multitexture for glx, wgl, and 3dfx targets 2000-06-09 21:34:21 +00:00
Joseph Carter
c1f7cef497 GLX now supports EXT_multitexture if you've got it, one more step
toward real ARB_multitexture.
2000-06-05 12:22:22 +00:00
Joseph Carter
9a348350df Multitexture for GLX, sortof. It's useless to you unless you've got
SGIS_multitexture (I assure you, unless you're on IRIX, you don't have
it!)  Added a Sbar_Changed () to fix the sbar overbright for a few people
and the very beginnings of ARB_multitexture are now in glquake.h
2000-06-04 13:53:29 +00:00
Joseph Carter
19afb34084 This adds multitexture for win32 back into the game. 2000-06-03 22:32:53 +00:00
Joseph Carter
8d08bc4d86 This is a NON-TRIVIAL update which took LordHavoc and I about 3 days to
make work properly:

Win32 thing..  If you don't free textures explicitly, you can cause a
problem with nVidia drivers.

Colored lighting is now RGB instead of RGBA.  The alpha is kinda pointless
on a lightmap and the effect's not all that great.  Plus people stuck with
16 bit OpenGL (any other 3dfx people out there?) will be quite pleased
with the improvement in image quality.  This does include LordHavoc's
dynamic light optimization code which takes most of the pain out of having
gl_flashblend off.

All glColor*'s are now half of what they used to be, except where they
aren't.  If that doesn't make sense, don't worry.  If you see one that's
only half what you'd expect, don't worry---it probably is meant to be like
that..  (More below)

glDisable (GL_BLEND) is now a thing of the GL_PAST.  As is GL_REPLACE.
Instead, we _always_ use GL_MODULATE and leave GL_BLEND turned on.  This
seems at first like it might be a performance hit, but I swear it's much
more expensive to change blending modes and texture functions 20-30 times
every screen frame!

Win32 issue..  Even though we check for multitexture, we currently don't
use it.  Reason is that I am planning to replace SGIS_multitexture with
the preferred ARB_multitexture extension which is supported in most GL 1.1
implementations and is a requirement for GL 1.2 anyway.  I also wanted to
get rid of some duplicated code.  Since Linux doesn't support multitexture
yet, I just commented out the code keeping me from compiling to get it to
work.  Win32 should work without it until it's fixed, which shouldn't be
long since the differences between SGIS and ARB multitextures as far as
Quake is concerned is minimal AT BEST.

LordHavoc and I have been working tirelessly (well not quite, we both did
manage to sleep sometime during this ordeal) to fix the lighting in the GL
renderers!  It looks DAMNED CLOSE to software's lighting now, including
the ability to overbright a color.  You've gotta see this to know what I'm
talking about.  That's why the glColor*'s are halved in most places.  The
gamma table code and the general way it works is LordHavoc's design, but
over the course of re-implementing it in QF we did come up with a few more
small optimizations.


A lot of people have noticed that QF's fps count has gone to shit lately.
No promises that this undid whatever the problem was.  That means there
could be a huge optimization lurking somewhere in the shadows, waiting for
us to fix it for a massive FPS boost.  Even if there's not, the code in
this commit DOUBLED MY FPS COUNT.  Granted I was getting pathetic FPS as
it was (around 30, which is pathetic even for a Voodoo3 in Linux) but
still---60 is a big improvement over 30!

Please be sure to "test" this code thuroughly.
2000-06-03 19:56:09 +00:00
Joseph Carter
0f9bcaf22f -gamma for Linux! No you can't control it from the menu, it has to be
done on the cmdline at the moment.  Menu support later if possible.
2000-05-31 17:46:59 +00:00
Joseph Carter
ef1c6be3df New Cvar function: Cvar_SetFlags. Yes, it's there for completeness.
Some minor changes to DGA code I couldn't be bothered to back out before
I committed.  They don't hurt anything, but they don't really improve
matters much either.  The mouse cursor still doesn't get warped off the
screen, but it's no longer bright blue - now it's black and white like
normal.  I'm rewriting the damned DGA code from scratch to Get It Right
this time.
2000-05-27 16:40:36 +00:00
Jeff Teunissen
7bbb9963cc s/HAS_/HAVE_/g 2000-05-23 16:57:12 +00:00
Bill Currie
290c2f9c0f +set_vidfullscreen is 95% working for -x11 and -glx. only remaining known problem is mouse grabbing. 2000-05-23 07:33:03 +00:00
Bill Currie
3951d1fe4c bring across the VID and IN modules for svga, x11 and glx from OT. 2000-05-23 06:36:33 +00:00
Joseph Carter
3d59dfed98 Before I can fix the (MANY!) problems with newtree, I have to fix the
little problem of mixed QFile and FILE.  Since we're not using ZLib in
this tree, QFile makes no real sense.  That didn't fix the real problem
I am having though.
2000-05-22 21:16:22 +00:00
Bill Currie
ea1386f190 fixes for __attribute__((format)) (I'll commit that /after/ release) and freelook 2000-05-22 05:47:14 +00:00
Anton E. Gavrilov
a955b34f46 freelook cvar support 2000-05-22 03:15:30 +00:00
Bill Currie
af032b8d55 port in some improvements from OT (namely fs_basepath, etc, though commandline parsing isn't finished yet)
split up the headerfiles and such. common.[ch] and qwsvdef.h no longer exist. More work still needs to be done (esp for windows) but this should be a major improvement.
2000-05-21 08:24:45 +00:00