For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it. These domains were converted:
* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
Users with disabled VSync might not expect any forced waiting on the GPU,
and the GL sync methods were intented to fix issues with VSync only,
so the new heuristic for SYNC_GL_AUTO is to enable GL sync only if
VSync is enabled, too.
Users can still request to use a specific GL sync method via the
-gl_syncmethod switch, independent of the VSync setting.
[Kp: folded `else { if () }` into `else if ()` to avoid moving
`ogl_have_ARB_sync` lines. Original change visible at
<https://github.com/dxx-rebirth/dxx-rebirth/pull/381>.]
This mirrors the logic from calc_frame_time(). When VSync is enabled,
waiting for the previous frame to complete might induce long wait periods,
up to the complete frame time, so we should also handle multiplayer there.
For the other sync modes, the GL calls will simply block, so we can't do
anything about that (except going multithreaded, but that's a totally
different can of worms). Note that even without sync, the SwapBuffers()
call in gr_flip() may also block if VSync is on (and enough frames are
queued up), so the issue is not the GL sync code itself.
SYNC_GL_FENCE_SLEEP is now probably the nicest mode for multiplayer
with VSsync, as it is the only one which has the potential to continue
handling multiplayer packets during the wait for VBlank time.
Some Linux libraries print their own messages to stdout/stderr,
particularly in case of severe errors. Decorate messages generated by
Rebirth to distinguish them from library generated messages.
For specific blacklisted renderers, add a message informing the user
that the blacklist matched and changed settings.
Split ogl_get_verinfo() into ogl_tune_for_current() and
ogl_extensions_init(), and consolidate all the OpenGL extension handling
into ogl_extensions.cpp. Unify the code paths for texture anisotropy and
GPU synchronization for OpenGL and OpenGL ES.
Currently, our renderer only uses GLES 1.0, so no real world implementation
will support sync objects for such an old context, but the logic is valid,
and this way, the GLES specific code paths are reduced.
This patch also fixes an issue where the old ogl_get_verinfo() did modify
the texture filtering mode if no anisotropic filter was available. This
was some leftover from the time when the anisotropic filter was a just
a specific CGameConfig.TexFilt mode, and not a separate, orthogonal setting
CGameCfg.TexAnisotropy that it is now.
The new OGL extension code included <SDL/SDL.h>, which works when the
SDL headers are installed in a directory named SDL and that directory is
in a system search directory. Those conditions usually hold on Linux,
both for /usr/include and /usr/local/include. However, non-Linux users
sometimes install SDL in other places. Kreator reports that the OGL
build on OS X failed because his SDL headers were on the search path,
but not in a directory named SDL on the search path. Switch the
include directive to an unqualified name to match other SDL includes.
Reported-by: kreatordxx <private mail>
Fixes: db267af6f2 ("add basic OpenGL extension handling")