Commit graph

1819 commits

Author SHA1 Message Date
Yamagi
0ba9843ffe Merge pull request #223 from fucknohtml/master
Fix opengl linking for the renderers.
2017-08-02 11:11:13 +02:00
Alexander
0be75560fb fix opengl linking
The variable yquake2RendererLinkerFlags is used to store the linker flags for opengl but  the empty variable yquake2OpenGLLinkerFlags is used when linking libraries to the renderer.

Also there's no need to link the opengl libs to the opengl3 renderer when the glad extension loader is being used.
2017-08-02 14:59:31 +08:00
Yamagi Burmeister
7ca4e2ea5d Revert "Pass -Wno-misleading-indentation to silence spurious warnings."
Clang 4.0 doesn't like this and I'm too lazy to implement per compiler
CFLAGS.
2017-08-01 18:39:42 +02:00
Yamagi Burmeister
86fd714788 Allow to choose the fullscreen mode through the menu.
There're 3 possible values:
* no -> vid_fullsceen == 0
* keep resolution -> vid_fullscreen == 1
* switch_resolution -> vid_fullscreen == 2
2017-08-01 18:32:44 +02:00
Yamagi Burmeister
911d225496 Pass an integer to SetMode_impl() instead of a qboolean.
The functions signature was changed several commits ago.
2017-08-01 18:20:30 +02:00
Yamagi Burmeister
3f8be88e84 Fix fullscreen switch through alt-enter. 2017-08-01 18:16:24 +02:00
Daniel Gibson
6d39da37ca Print system SDL version on startup 2017-08-01 18:14:31 +02:00
Yamagi Burmeister
5e61c23fd8 Only set SDL 1.2 fullscreen if it's requested. 2017-08-01 18:11:46 +02:00
Yamagi Burmeister
908fd30148 Switch from SDL_WINDOW_FULLSCREEN to SDL_WINDOW_FULLSCREEN_DESKTOP.
SDL_WINDOW_FULLSCREEN changes the display resolution if the requested
resolution is different to the actual resultion. SDL_WINDOW_FULLSCREEN_
DESKTOP doesn't do that, it places a smaller or bigger render area
somewhere inside the fullscreen area. This is somewhat nicer with modern
high resolution flatscreens.

This commit changes vid_fullscreen 1 from SDL_WINDOW_FULLSCREEN to
SDL_WINDOW_FULLSCREEN_DESKTOP. Additional vid_fullscreen 2 is
implemented, it uses SDL_WINDOW_FULLSCREEN to create the fullscreen
area.

TL;DR: Use vid_fullscreen 1 to keep the current resolution or use
vid_fullscreen 2 to switch the resolution.

Implementation details: The whole fullscreen stuff is a horrible mess.
Like generations of hackers before me I'm not desperated enough to clean
it up. GLimp_InitGraphics() is modified to take the fullscreen mode as
an integer and not as a boolean. That's a change to the renderer API.
In GLimp_InitGraphics() the needed SDL fullscreen mode flag is
determined once at the top and just used further down below. That saves
dome SDL1 <-> SDL2 compatibility cruft. IsFullscreen() was modified to
return the actual fullscreen mode and not just if fullscreen is enabled.
2017-08-01 10:08:24 +02:00
mulander
60bef10748 Don't use -Wl,--no-undefined on OpenBSD
Breaks the build since version 7.00
2017-07-20 17:47:56 +02:00
Yamagi Burmeister
6da4a31740 Pass -Wno-misleading-indentation to silence spurious warnings.
Recent GCC versions print a lot of missleading indentation" warnings
in third party code, making the build log more or less unreadable.
2017-06-30 14:12:57 +02:00
Yamagi Burmeister
4f803aedd2 Correct some missindentions pointed out by recent GCC versions. 2017-06-30 13:52:09 +02:00
Yamagi Burmeister
e134ae578f Reset vod_renderer to gl1 if the requested lib couldn't be loaded.
This was reported in issue #209.
2017-06-30 13:43:37 +02:00
Yamagi Burmeister
815bc34646 Bump version to 7.02pre. 2017-06-24 08:49:11 +02:00
Yamagi Burmeister
e1aadc5796 Bump version to 7.01. 2017-06-23 15:46:41 +02:00
Yamagi Burmeister
9236b61153 Clearify that we fixed the build on all platform without SSE. 2017-06-21 15:27:23 +02:00
Yamagi Burmeister
20abcf8e47 Update the CHANGELOG for 7.01. 2017-06-21 14:29:46 +02:00
Yamagi Burmeister
86649ebdac Mention crosshairscale in the cvarlast.md. 2017-06-21 10:22:29 +02:00
Yamagi Burmeister
dd41ff3601 Tell Windows that we're HighDPI aware.
This prevents Windows from scaling our (fullscreen) window to crap if
the whole desktop is scaled and we're rendering more than 1080p. This is
believed to fix #208.
2017-06-21 10:17:16 +02:00
Daniel Gibson
23ea2ea034 GL3: Square particles with cvar gl3_particle_square
if that cvar is set to 1, particles aren't rendered as nice circles, but
as squares, like in the software renderer or in Quake1.

Also documented it in cvarlist.md and fixed some typos there
2017-06-20 18:31:32 +02:00
Yamagi
837f017016 Merge pull request #207 from smcv/system-openal
Only use /usr/local/opt/openal-soft on Darwin
2017-06-19 10:07:16 +02:00
Simon McVittie
992f453016 Only use /usr/local/opt/openal-soft on Darwin
Commit 883781c selected these paths for all OSs, but when linking to
a system copy of OpenAL for Linux distribution binaries we want the
normal OpenAL in /usr.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-06-18 15:33:51 +01:00
Daniel Gibson
1da7ff5594 Fix Jennell Jaquays' name in credits and quit screen
the latter is done by identifying the baseq2 pics/quit.pcx in LoadPCX()
and changing some pixels
2017-06-12 18:32:56 +02:00
Yamagi Burmeister
4c8d504cf7 Enforce static linking of libgcc on Windows.
This is part of issue #205.
2017-06-10 10:01:05 +02:00
Daniel Gibson
36c880e105 GL3: Update HandMadeMath.h to include my non-SSE patch
from https://github.com/StrangeZak/Handmade-Math/pull/60

Hopefully fixes #204 (broken build on ARM)
2017-06-09 12:30:44 +02:00
Yamagi Burmeister
8fa861d8e9 Bump version to 7.01pre.
While here remove missleading comment.
2017-06-08 18:12:55 +02:00
Yamagi Burmeister
95b0c6a38b Bump the version number to 7.00. 2017-06-08 17:29:51 +02:00
Yamagi Burmeister
9f3c2296dc Clarify Sandy Bridge GPUs with GL3.
Sandy Bridges hardware is OpenGL 3.2 compatible and Mesa3D has a working
driver. But the crappy Windows driver is limit to OpenGL 3.1... GL3 is
working on Linux, but not on Windows.
2017-06-06 17:50:58 +02:00
Yamagi Burmeister
a6704af878 Add al_driver and gl_nolerp_list to the cvarlist.md 2017-06-06 17:48:51 +02:00
Daniel Gibson
6e6c90bd8c cvarlist: fix some typos 2017-05-25 17:28:28 +02:00
Yamagi
8301d893f2 Merge pull request #203 from DanielGibson/cvarlist-gfx
Revamp cvar list (split up in sections, improve gl_*/gl3_* descriptions)
2017-05-25 14:09:00 +02:00
Daniel Gibson
809246ca92 Revamp cvar list (split up in sections, improve gl_*/gl3_* descriptions) 2017-05-25 13:59:10 +02:00
Yamagi Burmeister
d0ad58cdb3 Update the CHANGELOG for 7.00 2017-05-25 11:45:18 +02:00
Yamagi Burmeister
c5f10dd879 Switch to a new, MSYS2 based build environment for Windows.
Highlights are:
- Since MSYS2 is much more unixlike than our old build environment we
  can remove most Windows specific hacks from the Makefile.
- MSYS2 has an package manager, the build environment can be updated
  by "pacman -Syu" just like an ordenary Arch Linux installation.
- Parallel builds are now working.
- git is integrated into the build envirment.
- zlib is now linked as a dynamic lib.

After this commit the old bild environment will no longer work! The
latest version must be downloaded and extracted to C:\MSYS2. Get it
here: https://deponie.yamagi.org/quake2/windows/build/
2017-05-25 11:21:52 +02:00
Yamagi Burmeister
346b841e72 Fox whitespace errors. 2017-05-25 10:21:16 +02:00
Yamagi Burmeister
eb27fa4d77 Fix some typos. 2017-05-25 10:20:12 +02:00
Yamagi Burmeister
f02bd475bd Add a list off (nearly) all added console variables and their meaning. 2017-05-25 10:07:33 +02:00
Yamagi Burmeister
f6e3f1f4bc Hide OpenALs doppler effect behind s_doppler.
This allows it to disable the doppler effect by setting s_doppler to 0.
The default value 1 == enabled.
2017-05-25 09:11:47 +02:00
Yamagi
2e4a48798d Merge pull request #200 from xorw/master
use correct velocity scaling for openal audio sources
2017-05-25 08:43:48 +02:00
xorw
ff54b3ac1f use correct velocity scaling for openal audio sources 2017-05-20 07:23:24 +02:00
Yamagi
505c67385e Merge pull request #198 from DanielGibson/gl3-shadows-last
GL3: Render Model shadows last, refactor gl3_mesh.c
2017-05-16 08:58:09 +02:00
Daniel Gibson
865e97514d GL3: Render Model shadows last, reduce global variables in gl3_mesh.c
The model shadows are rendered after all entities are rendered.
This fixes them making entity brushes below them translucent (#194)

The model rendering code used lots of global variables, many of them
totally superfluous (esp. currententity, currentmodel).
I refactored the code to use less global variables (this was at least
partly needed to render the shadows later).
So this looks like lots of changes, but many of them are just using
"entity" instead of "currententity" or "model" instead of "currentmodel"
2017-05-15 12:34:38 +02:00
Yamagi Burmeister
6119591c6a Fix build with WITH_OPENAL disabled.
This closes issue #192.
2017-05-13 16:53:20 +02:00
Yamagi
8af427b0c9 Merge pull request #196 from xorw/master
Finished doppler shift support (added listener's velocity update)
2017-05-12 17:58:04 +02:00
xorw
29d109f8ef Finished doppler shift support (added listener's velocity update) 2017-05-10 12:21:56 +02:00
Yamagi
e6d46eb452 Merge pull request #193 from xorw/master
Add partial doppler shift support for 3D audio sources.
2017-05-09 21:38:30 +02:00
Yamagi
a659da38c1 Merge pull request #191 from DanielGibson/gl3_shadows
GL3 shadows
2017-05-07 21:21:05 +02:00
xorw
da5aea4929 Add partial doppler shift support for 3D audio sources.
In game noticeable when dodging blaster projectiles or missiles :)

See: https://en.wikipedia.org/wiki/Doppler_shift
2017-05-07 06:14:10 +02:00
Daniel Gibson
9751caac85 GL3: Optimize shadow rendering
now DrawAliasShadow() only uses one draw call per model, pretty much
like DrawAliasFrameLerp()
2017-05-02 06:25:04 +02:00
Daniel Gibson
b45a6d8ef9 GL3: Simple Stencil-Shadows
Like GL1 gl_shadows + gl_stencilshadows: no shadow volumes, but looks
ok apart from standing over edges

The gl_stencilshadows cvar isn't used in GL3, it always uses the stencil
buffer if available (and if gl_shadows != 0)

This still needs performance optimizations: Like the GL1 impl it takes
lots of draw calls per model, it could be done with one per model like
when rendering the actual model.
2017-05-02 06:25:04 +02:00