This fixes an issue on iOS platforms where the version number string is
prefixed with "OpenGL ES " despite the Khronos docs for OpenGL ES
specifying that "The GL_VERSION and GL_SHADING_LANGUAGE_VERSION strings
begin with a version number".
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
Previously, it wasn't safe to access Font instances from multiple
threads because there was a chance that they might reference the same
shared internal state. In this case, calling getTypeface() or getAscent from
two threads simultaneously would cause a race on the typeface and ascent
data members, even though the Font instances appeared to be disjoint.
With this change in place, it is now safe to use Font instances from
multiple threads simultaneously.
It is still an error to modify the same Font instance from multiple
threads without synchronization!
// Fine:
Font a;
Font b = a;
auto futureA = std::async (std::launch::async, [&a] { /* do something with a */ });
auto futureB = std::async (std::launch::async, [&b] { /* do something with b */ });
// Bad idea:
Font f;
auto futureA = std::async (std::launch::async, [&f] { /* do something with f */ });
auto futureB = std::async (std::launch::async, [&f] { /* do something with f */ });
Previously, we were always adding a #version 150 directive to shaders
when the GLSL version was higher than 1.2, which could cause compilation
to fail on platforms with GLSL versions between 1.2 and 1.5.
On Linux, repaints are only issued if the number of received SHM
completion events matches the number of events initiated with
`xShmPutImage`.
Previously, destroying a GL context was calling `XSync (display, True)`
which cleared the event queue. Sometimes, this would cause an 'SHM
Completion Event' to be removed from the queue. This meant that the
number of received events would never match the number of initiated
events, and repainting would stop indefinitely.
By calling `XSync (display, False)` instead, we ensure that pending
events are kept in the queue, so any pending SHM completion event will
be found as usual during the next repaint timer callback.