Commit graph

20 commits

Author SHA1 Message Date
Kp 12b57e84e6 Switch most in-tree http:// links to https://
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
2018-09-02 00:57:29 +00:00
derhass 38815ba10b change SYNC_GL_AUTO mode to disable GL sync if VSync is turned off
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>.]
2018-04-23 04:57:48 +00:00
derhass 8e43a845b3 handle multiplayer network packets during SYNC_GL_FENCE_SLEEP wait loop
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.
2018-04-22 18:14:34 +02:00
Kp 01e1b28d71 Replace useless printf with puts 2017-12-05 05:29:55 +00:00
Kp 6b209c8713 Decorate OpenGL messages
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.
2017-08-26 19:47:51 +00:00
Kp 5d951e4453 Move ogl_sync fence into local scope for before_swap 2017-04-08 16:48:19 +00:00
Chris Taylor bde055a6a1 Fix 'declaration shadows a field of 'dcx::ogl_sync'' warning
Replace fence with fence_func in implementation of ogl_sync::sync_deleter::operator().
2017-01-13 12:30:09 +08:00
derhass 1fe4f1ed67 clean up ogl_extensions.cpp as suggested by vLKp 2016-11-05 19:16:30 +01:00
derhass 551570d29b Unify OpenGL extension handling between OpenGL and OpenGL ES code paths.
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.
2016-11-03 21:59:11 +01:00
Kp 27cef20eb3 Move namespace dsx handling to dsx-ns.h 2016-03-19 19:08:10 +00:00
Kp 455ab60c4a Switch OGL extension include to <SDL.h>
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")
2016-02-11 03:25:52 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp de6c2b3982 Use inline namespace dcx for common/arch/ogl 2015-12-05 22:57:24 +00:00
Kp 371838c74e Use unique_ptr to manage GLsync fence 2015-05-09 17:39:01 +00:00
Kp 5a2c11c7ad Precompute OGL sync wait_timeout milliseconds 2015-05-09 17:39:01 +00:00
Kp ff83ba95b6 Remove unused ogl_extensions_init return value 2015-03-25 01:59:21 +00:00
Kp 694c522756 Use array<> for OpenGL extension version 2015-03-25 01:59:20 +00:00
derhass bf723efd48 use C++ style reinterpret_casts to pointers from SDL_GetProcAddress to function pointer types 2015-03-23 20:06:23 +01:00
derhass 6d41224638 move GL synchronization code into its own class 2015-03-22 21:19:06 +01:00
derhass db267af6f2 add basic OpenGL extension handling
Currently only used for fence sync objects.
2015-03-22 20:32:14 +01:00