Commit graph

1670 commits

Author SHA1 Message Date
Yamagi Burmeister
dafc41f509 Switch GL_ARB_texture_non_power_of_two to our new probing logic.
While at it rename R_Upload32Old to R_Upload32Soft.
2016-08-06 10:37:24 +02:00
Yamagi Burmeister
2e7166b157 Probe GL_EXT_texture_filter_anisotropic with our new logic 2016-08-06 10:18:58 +02:00
Yamagi Burmeister
43c9970772 Switch GL_EXT_paletted_texture to the new probing logic 2016-08-06 10:08:17 +02:00
Yamagi Burmeister
9f0b5d067b Use GL_ARB_point_parameters instead of GL_EXT_point_parameters.
While here switch GL_ARB_point_parameters to a new probing logic and
rename the Cvar to gl_pointparameters.
2016-08-06 09:50:16 +02:00
Yamagi Burmeister
4057376993 GL_EXT_compiled_vertex_array is unused. Remove it.
At can be added back, if it's ever needed.
2016-08-06 09:35:08 +02:00
Yamagi Burmeister
0967f051d8 Require OpenGL 1.4 2016-08-06 09:32:20 +02:00
Yamagi Burmeister
e4751e8c44 Use OpenGL multitexturing extensions to implement multitexturing...
This is a slighty revised version of id Software original code. Icculus
code may have some advantages on broken drivers or underpowered GPUs.
Today it's just a performance hook. This is a first step in fixing #147.
2016-08-05 18:38:48 +02:00
Yamagi Burmeister
2baf97bdf6 Throttle the client to 1000 FPS.
This is more than enough for everyone and prevents wasting CPU time.
Without this change as many client frames as possible are rendered,
Quake II uses a complete core.
2016-08-05 07:49:47 +02:00
Yamagi Burmeister
7ea4db4ace Remove now unused function CL_SendCommand(). 2016-08-04 21:29:30 +02:00
Yamagi Burmeister
d15f5d5b97 Make sure CL_UpdateWindowedMouse() is called.
Without this the automatic mouse grab is not working.
2016-08-04 21:28:17 +02:00
Yamagi Burmeister
a70cc2d923 Switch the refresher to vertex arrays
This is based on work submitted by Scott "pickle" Smith. It's said that
vertex arrays are somewhat faster and more compatible than the old way.
This may remove support of some very, very old GPUs like the Riva128.
2016-08-04 21:11:31 +02:00
Yamagi Burmeister
4dcdb0dc17 Force GL_LIGHTMAP_FORMAT instead of gl_tex_solid_format.
This is more less cosmetics since gl_tex_solid_format == GL_RGB and
GL_LIGHTMAP_FORMAT == GL_RGBA. No measurable FPS change on Nvidia and
Intel. Based upon the OpenGL ES patch by Scott "pickle" Smith.
2016-08-04 21:11:31 +02:00
Yamagi Burmeister
275271c647 Always specify the alpha channel.
This is based upon the original OpenGL ES patch by Scott "pickle"
Smith. This change gives about the same frame rate on an 750TI but
about 3% more frames on an Ivy Bridge IGP with Mesa3D...
2016-08-04 21:11:31 +02:00
Yamagi Burmeister
4ae8706d22 Make the client asynchronous, e.g. decouble net and refresh frames.
This is largely based upon the cl_async 1 mode from KMQuake2, which in
turn is based upon r1q2. The origins of this code may be even older...
Different to KMQuake2 the asynchonous mode is not optional, the client
is always asynchonous. Since we're mainly integrating this rather
fundamental change to simplify the complex internal timing between
client, server and refresh, there's no point in keeping it optional.

The old cl_maxfps cvar controls the network frames. 30 frames should be
enough, even Q3A hasn't more. The new gl_maxfps cvar controls the render
frames. It's set to 95 fps by default to avoid possible remnant of the
famous 125hz bug.
2016-08-04 17:36:42 +02:00
Yamagi Burmeister
fa4eacc976 At OpenAL shutdown don't do not stop only the stream chan but all chans.
I'm not quite sure if this really makes a difference. But it's the only
idea I have regarding several "Quake II hangs at shutdown when OpenAL is
run with Pulseaudio backend" bugs.
2016-08-04 09:21:33 +02:00
Yamagi Burmeister
978eec1a8d Add an explicit fflush() when writing the config.
Yes, fclose() flushes the stream and yes, this is unnecessary. But I've
seen at least two times partial written configs on Win 10. :(
2016-08-04 09:07:47 +02:00
Yamagi Burmeister
f291693c59 Quit the game if a SDL_QUIT event is received. 2016-07-18 10:11:54 +02:00
Yamagi
7cb455459a Merge pull request #144 from smcv/source-date-epoch
savegame: ensure that BUILD_DATE is defined
2016-07-05 19:37:56 +02:00
Simon McVittie
38ff49e480 savegame: ensure that BUILD_DATE is defined
The game code does not include common.h, so it needs to redo this
part for builds without SOURCE_DATE_EPOCH, where BUILD_DATE will
not have been passed in from the outside.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-07-05 18:29:54 +01:00
Yamagi Burmeister
6d7d15af30 Fix Windows build. On Windows OpenAL32.dll must be opened at runtime. 2016-07-05 19:17:06 +02:00
Yamagi
5323873476 Merge pull request #143 from smcv/link-libopenal
Optionally link libopenal at compile time
2016-07-05 19:13:57 +02:00
Yamagi
0da70104e2 Merge pull request #142 from smcv/source-date-epoch
Override __DATE__ from SOURCE_DATE_EPOCH if set
2016-07-05 18:50:31 +02:00
Yamagi
3f6ce86c18 Merge pull request #141 from smcv/speling
Fix spelling errors detected by lintian
2016-07-05 18:18:51 +02:00
Simon McVittie
5887a9e79e Optionally link libopenal at compile time
In Linux distributions, having the executable depend on the right
libraries and arrange for them to be installed is straightforward,
and there's a lot of infrastructure for tracking which library
version a particular executable needs, including making sure we have
a version that contains all of the symbols that were used. Loading
libopenal at runtime defeats that infrastructure.

The ability to substitute a different-but-compatible libopenal,
or operate with reduced functionality without libopenal, might
still be desirable for generic/portable binary releases.

The CMake build system already linked the executable to
${OPENAL_LIBRARY} anyway, so it is already a hard dependency in that
build system.
2016-07-01 09:44:00 +01:00
Simon McVittie
c00707d449 Override __DATE__ from SOURCE_DATE_EPOCH if set
For deterministic/reproducible builds (where the same source and
toolchain can be verified to produce the same binary, allowing
maliciously substituted binaries to be detected) it is desirable to
take the software's idea of the build date from the build system;
otherwise, the real-time clock at the time of building affects the
result, making it non-reproducible.

SOURCE_DATE_EPOCH is a distribution-neutral specification for how
to do that. It is meant to be set by meta-build systems such as
dpkg or RPM, using a date/time that is already part of the source code,
for example the date of the latest git commit, the date in
the package's debian/changelog, or the date in the RPM spec file.

See https://reproducible-builds.org/specs/source-date-epoch/ for the
specification of SOURCE_DATE_EPOCH, or https://reproducible-builds.org/
for more information on reproducible builds in general.
2016-07-01 09:41:23 +01:00
Simon McVittie
92668ca6b1 Fix spelling errors detected by lintian
Based on a patch by Fabian Greffrath against an earlier version of
yquake2.
2016-07-01 09:38:54 +01:00
Yamagi Burmeister
6d38cc8609 Bump version number to 5.35pre 2016-06-25 11:03:48 +02:00
Yamagi Burmeister
c3894cb9de Update CHANGELOG 2016-06-25 10:28:42 +02:00
Yamagi Burmeister
bb8be981d5 Bump version number to 5.34 2016-06-25 10:22:18 +02:00
Yamagi Burmeister
b608264808 There're no open tasks. 2016-06-25 10:19:45 +02:00
Yamagi Burmeister
3ad89c2f0a libjpeg isn't needed anymore, add stb while here. 2016-06-25 10:17:05 +02:00
Yamagi Burmeister
4aa4db69ab Merge branch 'readme' 2016-06-25 10:11:47 +02:00
Yamagi Burmeister
83a9e20fa2 Preserve the old README as stuff/README.old 2016-06-25 10:07:59 +02:00
Yamagi Burmeister
9bd8b940db Add a new README, this time in markdown.
After some long discussions it was realizied that the old README had way
too much informations and was too unspecified on some topics. This new
README was written from scratch and focus on installing Quake II.
2016-06-25 10:02:45 +02:00
Yamagi Burmeister
5a384c79b1 Switch from an arch whitelist to an "all archs are supported" approach.
The old whitelist was a leftover from the early days of YQ2. It should
run on most / all architectures, as long SDL supports them. As suggested
by smcv in issue #138 generate the OSTYPE and ARCH defines by the build
system instead of hardcoding it.

Savegame compatibility is provided by bumping the savegame version. Old
savegames are compared against the old OSTYPE and ARCH defined, new ones
against the new defines. This compatibility code should be removed
somewhere in the distant future.
2016-06-11 09:23:10 +02:00
Daniel Gibson
da6ad6953d Use software gamma for OSX, fix #134
Hardware gamma is broken, especially in fullscreen, and a Mac user told me
that setting HW/screen gamma on OSX is a bad idea anyway, because it resets
the monitor calibration.
The game /should/ look ok with vid_gamma 1 (if your display is configured
properly), but if you think it's too dark set it a bit higher and do
vid_restart.
2016-05-28 16:04:07 +02:00
Daniel Gibson
1894165737 README: don't pretend we provide OSX binaries (missed things) 2016-05-20 01:30:54 +02:00
Daniel Gibson
ae2ebab17e README: don't pretend we provide OSX binaries 2016-05-20 01:27:54 +02:00
Yamagi Burmeister
6f64efbd17 Disable gl_ext_multitexturing by default.
Multitexturing was enabled by default in 0f7b422. It gives a small but
on todays hardware neglectable performance boost, but caused several
problems over the years. For example gl_showtris doesn't work with it
and there's at least one render glitch in city3.bsp.
2016-05-01 09:01:39 +02:00
Yamagi Burmeister
b4d16ab6b3 Some additions to last commit:
- SOLID_BBOX seems to be more correct.
- Make debris SOLID_BBOX, too.
2016-04-29 17:40:33 +02:00
Daniel Gibson
07477e0f75 Make gibs solid so they move with conveyor belts etc, like in fact2
not sure if this has any drawbacks, seems to work good so far.

No idea why id apparently deactivated this at some point, maybe to
optimize performance?
2016-04-16 21:04:32 +02:00
Yamagi Burmeister
eaee1d71d5 Rename cl_stereo* cvars to gl_stereo*.
They're renderer cvars, not client cvars.
2016-04-07 17:01:09 +02:00
Yamagi Burmeister
238ccb8adf Fix warnings with clang after the stereo merge 2016-04-07 16:57:32 +02:00
Valery Guskov
f6c596c1c5 better default configuration for 3d 2016-04-04 23:57:59 +03:00
Valery Guskov
9693004afb removed unused variable 2016-04-04 23:57:08 +03:00
Valery Guskov
e9dcf8d09e added 3d crosshair model 2016-04-04 23:53:16 +03:00
Valery Guskov
6ed4843257 too long line in readme 2016-04-04 23:49:36 +03:00
Valery Guskov
71255bde57 fixed spacing in readme 2016-04-04 23:48:47 +03:00
Valery Guskov
c168e501de added stereo support info to readme 2016-04-04 23:48:08 +03:00
Valery Guskov
43bd9deccd Update LICENSE 2016-04-04 23:37:27 +03:00