Commit Graph

97 Commits

Author SHA1 Message Date
Davide Beatrici
1571d91c0f overlay_gl/init_mac.c: remove code based on CGDisplayIsCaptured()
The function was removed and there is no replacement: https://developer.apple.com/documentation/coregraphics/1562061-cgdisplayiscaptured

Retrieving the resolution directly from OpenGL is probably better anyway.
2019-10-09 23:35:47 +02:00
Jan Klass
19b5702168 Bump version to 1.4.0
1.3.0 has been released. master now represents the current state of
development towards the next feature release 1.4.0.

Bugfixes for 1.3 will happen in the 1.3.x branch.

Compared to earlier version bumps we bump a lot more files because of
we produce more artifacts; overlay process, dll and exe split, etc.

This should have happened right after the 1.3.x branch was split off.
2019-09-22 10:24:19 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Harald Niesche
481299a2bb Correct case of AGL/agl.h to allow compilation on case-sensitive filesystem 2018-03-11 19:22:43 +01:00
davidebeatrici
5477e8f999 overlay: set custom build directory in relation to the global one 2018-02-18 23:56:34 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Matthias von Faber
2903f3bed2 overlay_gl: linux: only assume absolute dynamic entries on glibc.
This fixes a crash in libmumble's library constructor when built against
the musl libc.

The code that locates libc's dlsym(3) relied on addresses in dynamic
entries in the link map returned by dlopen(3) to always be absolute.
This seems to be specific to glibc though, so add a glibc feature test.
2017-09-03 19:14:40 +02:00
Jan Klass
27a983d094 Fix indentation in pro files
Make them consistently two spaces indentation.

In two places a wrong indentation level was fixed.
2017-08-05 20:37:19 +02:00
Davide Beatrici
d04995899a Move .pri files and "toolchain" folder in "qmake" 2017-03-05 15:48:16 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
74f5930e1c *.pro: use 'linux*' instead of 'linux' for Linux conditionals.
This makes the check Qt 4-compatible.
2016-12-08 22:41:24 +01:00
Mikkel Krautz
5cffbf3bd3 Always prepend 'release' or 'debug' dirs when adding to QMAKE_LIBDIR.
This commit changes various pri and pro files to always prepend
the global build output directory (which can be either 'release'
or 'debug', depending on the current build configuration).

Otherwise, if a library that we build ourselves, such as -lspeex in
CONFIG+=bundled-speex, is also available in one of the other lib dirs,
we can't be sure that the one in our build output directory will be used.

This is a problem on FreeBSD, where we add /usr/local/lib
to the QMAKE_LIBDIR in compiler.pri. That directory might contain
its own -lspeex.

With this change, we now prefer libraries in our build output directory
to system libraries.
2016-11-27 01:13:57 +01:00
Mikkel Krautz
477f886214 overlay_gl: use Elf_Sym instead of Elf64_Sym in FreeBSD specific-code.
This ensures we use the Elf_Sym type instead of Elf64_Sym.

This makes the FreeBSD-specific code work on both 32-bit
and 64-bit targets.

Fixes mumble-voip/mumble#2122
2016-07-03 22:42:25 +02:00
Mikkel Krautz
dce83ca911 Merge PR #2356: overlay_gl: call glDrawArrays with GL_TRIANGLES instead of GL_QUADS. 2016-06-23 23:07:29 +02:00
Mikkel Krautz
b16e5a121e overlay_gl: unmask framebuffer color components in drawContext().
World of Warcraft masks all colors via glColorMaskIndexedEXT(0, 0, 0, 0, 0)
before we draw our overlay.

This broke overlay rendering on OS X when shadow quality was set
to anything greater than low.

This commit ensures that we allow drawing of colors to the main
framebuffer -- so we can draw the overlay properly.

Fixes mumble-voip/mumble#1010
Fixes mumble-voip/mumble#1561
2016-06-19 20:35:51 +02:00
Mikkel Krautz
e13d6c94bf overlay_gl: call glDrawArrays with GL_TRIANGLES instead of GL_QUADS.
GL_QUADS is deprecated in modern GL.
2016-06-19 20:29:26 +02:00
Mikkel Krautz
3dad85f423 overlay_gl: update to use LICENSE.header. 2016-05-10 22:42:03 +02:00
Mikkel Krautz
3a356a2a13 overlay_gl: port to FreeBSD.
Refactor the code to find the RTLD's dlsym() symbol into a function,
find_odlsym(). Implement a FreeBSD-specific version of the code.

Verified against 'glxgears'.
2015-11-23 01:24:42 +01:00
Mikkel Krautz
f931ef1c20 overlay_gl: add missing mach_override include for OS X. 2015-11-15 12:46:33 +01:00
Mikkel Krautz
e4c80dac75 Fix warnings in overlay_gl when built with GCC 5.2.1 for i386. 2015-11-08 22:50:54 +01:00
Stefan Hacker
66ff6d6db4 Fix warnings in overlay_gl C code 2015-10-28 19:47:45 +01:00
Stefan Hacker
4fe1664860 Handle some possible failure cases in overlay_gl
Namely:
* fstat failure
* Dangerously large overlay texture size
2015-07-04 15:12:49 +02:00
Stefan Hacker
d3d6920da9 Fix various warnings in Linux build
This patch fixes various warnings encountered
in the build when using gcc 4.9.
2015-07-04 15:12:49 +02:00
Mikkel Krautz
06e19e6fb1 Check for Mesa rather than GLX > 1.2 when determining glXQueryDrawable GLX_WIDTH/GLX_HEIGHT availability.
You cannot query for GLX_WIDTH and GLX_HEIGHT using glXQueryDrawable in Mesa.
It simply fails with an error, and crashes the program:

    X Error of failed request:  GLXBadDrawable
      Major opcode of failed request:  156 (GLX)
      Minor opcode of failed request:  29 (X_GLXGetDrawableAttributes)
      Serial number of failed request:  41
      Current serial number in output stream:  41

The old check to only allow using glXQueryDrawable using GLX > 1.2
presumably worked for older Mesa versions, but now, Mesa advertises
GLX > 1.2.

That makes the overlay practically unusable when using Mesa.

This commit changes the code path to detect Mesa instead of GLX > 1.2,
and makes the overlay work correctly on Mesa once again.
2015-06-05 13:25:51 +02:00
Mikkel Krautz
859da4dabe Do not link the Linux overlay with '-z now'.
Linking the overlay library with '-z now' requires all target
processes to have libGL symbols in them at load time.
If it doesn't, the program will not start at all.

Instead, explicitly use '-z lazy' to defer libGL symbol resolution
until first use, which is never for non-libGL users.
2015-06-05 13:03:05 +02:00
Mikkel Krautz
a66fdeb261 overlay_gl: remove unnecessary qmake message. 2015-06-05 02:17:31 +02:00
Will Tange
0fdb7c17e5 Mark shebanged files as executable 2015-05-12 18:51:23 +02:00
Evan Purkhiser
82ca800803 Follow XDG directory spec for RPC socket & overlay pipe
If the XDG_RUNTIME_DIR environment variable is present the overlay
pipe and RPC socket will be created at..

    $XDG_RUNTIME_DIR/MumbleSocket
    $XDG_RUNTIME_DIR/MumbleOverlayPipe
2015-05-11 20:19:55 +02:00
Mikkel Krautz
f0ff84f6c0 Unify overlay code for Unix and OS X.
This commit removes macx/overlay and merges
the OS X overlay into the Unix overlay in
overlay_gl.

Most of the overlay logic is exactly the same,
with most of the differences being in the
initialization code and the addition of few new
messages for the interactive client-in-overlay
feature that the OS X overlay suports.

The initialization code is factored out into
init_unix.c for Unix-likes and init_mac.c
for OS X.

These init files are #included by overlay.c.
That is, they're not separate translation
units. Doing it this way cuts down on the
total LOC count and overall complexity of the
code.

The interactive overlay support is ported
directly from the OS X overlay. It's mostly
a matter of supporting a few new message types:
OVERLAY_MSGTYPE_PID and OVERLAY_MSGTYPE_INTERACTIVE.

The overlay_gl.pro file in this commit is mostly
just a combination of the .pro files of the two
overlays, with a minor difference in the CFLAGS
for the OS X overlay. In old OS X overlay, the
overlay had an ".m" file extension, signalling
that it is an Objective-C source file to the
C compiler. Since the combined overlay has a
".c" extension, "-x objective-c" is added to
CFLAGS on OS X to tell the compiler to compile
the overlay as Objective-C code.
2015-02-07 23:24:47 +01:00
Kissaki
a7d103f6b2 Fix indentation. Add curly braces according to coding style.
* In one case, also split a long if statement into multiple lines
2015-01-10 16:35:21 +01:00
scapula
6e9a7e7cb1 Disable vertex attrib arrays in overlay_gl (fixes #1298)
This is a fix for the OpenGL overlay which disables
and enables the vertex attrib arrays inside drawContext.
The problem it fixes is that some games leave some of
the arrays enabled between frames, which I think
(not an OpenGL expert) causes the input to the vertex
shader to essentially be arbitrary.
2014-10-15 22:33:54 +02:00
Mikkel Krautz
689f4c1847 Bump version to 1.3.0 2014-04-05 10:26:25 +02:00
Kissaki
07c78b1481 Refac: Use constant to check return value
* mmap supposedly returns MAP_FAILED on errors, which is supposedly
defined in <sys/mman.h>, which is already being included in this file.
2013-06-11 23:03:32 +02:00
Kissaki
f09e943b6c * Commenting, varnaming, fix indent
* commenting and adjusting debug output
* more descriptive varnaming
2013-06-11 23:03:31 +02:00
Mikkel Krautz
8632246f98 Bump version to 1.2.5 2013-06-08 23:41:51 +02:00
Thorvald Natvig
1ada87d5f2 Fix warnings in overlay_gl 2011-05-15 16:19:07 -07:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Thorvald Natvig
064a5a3672 Bump version to 1.2.4 2011-02-20 05:12:02 +01:00
Mikkel Krautz
0f355bdade Only disable GL_TEXTURE_GEN_* if they're already enabled. Fixes black screen issue with EVE on OSX (via Cider) 2010-09-06 23:26:15 +02:00
Mikkel Krautz
1ac9afacab Unix/MacOSX overlay library: Tell OverlayClient when we've mapped SharedMemory so it can safely be released. 2010-08-31 20:09:31 +02:00
Stefan Hacker
11fda9bfcd Fix *nix OpenGL overlay and add FPS counter code to OSX overlay.m 2010-04-29 22:45:25 +02:00
Stefan Hacker
6380a88687 Transmit fps more often and represent them as float 2010-04-29 15:53:43 +02:00
Stefan Hacker
d8f1ac1115 Add an optional FPS counter to the overlay 2010-04-28 20:22:28 +02:00
Anton Romanov
ec7e78d175 in case GL_ARRAY_BUFFER is bound, store and reset it before rendering overlay and restore after 2010-04-18 02:04:16 +02:00
Thorvald Natvig
9fa00c3c1c Use premultiplied alpha textures 2010-03-01 03:14:31 +01:00
Thorvald Natvig
e31b2659de Bump version to 1.2.3 2010-02-10 13:28:16 +01:00
Mikkel Krautz
37430b152a Make sure to pop the whole GL error stack when cleaning up. 2010-02-04 01:06:56 +01:00
Thorvald Natvig
e0c6b91663 Only switch unpack buffer if we have to 2010-02-03 20:49:09 +01:00
Mikkel Krautz
6f2802032c Unbind PBO buffer before we draw our GL overlay. 2010-02-01 20:33:29 +01:00
Thorvald Natvig
c00b9bfe9e Socket-based linux overlay 2010-01-25 16:46:23 +01:00