1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

681 commits

Author SHA1 Message Date
attila
d9a3efd3cb ComponentPeer::VBlankListener: Add timestamp parameter to the vblank callback 2024-10-25 15:44:34 +02:00
reuk
4bc2952419
OpenGL: Set up context sharing on the GL thread, rather than the main thread
wglShareLists will only succeed when the shared context is not currently
active on another thread, but it is difficult to ensure that the GL
thread is paused/inactive at any given time - in particular, it's very
easy to accidentally introduce deadlocks where the main thread waits for
the render thread's lock while the render thread waits for the
messagemanager lock.

The simplest way to ensure that no other thread has activated the shared
context is to share the contexts directly on the render thread itself.
2024-10-24 20:43:10 +01:00
reuk
10680f9bf7
OpenGL: Detach OpenGL context after initialisation 2024-10-24 20:43:10 +01:00
reuk
e2e3d949c7
OpenGL: Use C++ thread_local instead of JUCE ThreadLocal 2024-10-24 20:43:10 +01:00
reuk
fcaf5adb25
OpenGL: Avoid displaying OpenGL window until a frame has been drawn
This avoids an issue where, when attaching an OpenGLContext as a child
of a window rendered with Direct2D, the area covered by the OpenGL
renderer would display as a white rectangle until the context had
drawn a frame. This only affected the Direct2D renderer; when the parent
window used the software renderer, no white rectangle was shown.
2024-10-24 20:43:09 +01:00
reuk
90f37e27ea Windows: Fix DLL build
There were a few "ambiguous operator new/delete" errors that were due to
inheriting from a private base class that used the leak detector. These
errors are resolved by adding the leak detector to the derived classes.

JUCE_API was missing from a few useful types, notably the ARA hosting
types.
2024-10-22 13:24:46 +01:00
Tom Poole
14c8d06fb0 Bump version number to 8.0.3 2024-10-15 22:16:12 +01:00
Tom Poole
c1d2846e47 Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
reuk
8754d87900 Windows: Fix build warnings when JUCE_DISABLE_ASSERTIONS is set 2024-09-13 13:57:10 +01:00
reuk
735f99418c
OpenGL: Ensure window repainting messages are emitted correctly on Windows
This fixes an issue introduced in
340f531c71 where embedded OpenGL windows
would incorrectly have the WS_EX_LAYERED style bit set, which in turn
prevented them from displaying correctly.

Before the window-transparency refactoring, OpenGL windows would not
have the layered bit set because only peers with windowIsSemiTransparent
were created with the layered bit, and the layered bit was only updated
if the peer alpha was changed.

The new behaviour is to always set WS_EX_LAYERED if the peer's component
is non-opaque with no titlebar, or if the component has an alpha < 1.0f.
The OpenGLContext's placeholder component has no titlebar, so it must be
opaque in order to avoid setting the layered style bit.
2024-09-05 12:14:54 +01:00
Anthony Nicholls
cddd43891d OpenGL: Stop calling disableScreenUpdatesUntilFlush on macOS 2024-08-14 15:35:50 +00:00
Tom Poole
fc0fd3042f Bump version number to 8.0.1 2024-07-29 12:43:19 +01:00
reuk
8ac7bfc9ca
Platform: Remove compatibility checks for macOS 10.10 2024-07-02 18:06:27 +01:00
reuk
9112911122
MinGW: Remove support 2024-06-27 18:10:21 +01:00
reuk
19061e6d17
Direct2D: Add initial support 2024-04-18 14:16:02 +01:00
reuk
4f2c287f9b
Font: Deprecate old Font constructors 2024-04-18 14:16:00 +01:00
reuk
72819437e7
RenderingHelpers: Move drawGlyph to a common location 2024-04-18 14:15:59 +01:00
reuk
bc654f8007
RenderingHelpers: Reduce templating of GlyphCache 2024-04-18 14:15:58 +01:00
Tom Poole
2fc069b450 Bump version number to 8.0.0 2024-04-16 17:43:20 +01:00
Tom Poole
94d98a2b10 Update licensing information 2024-04-16 11:39:35 +01:00
Tom Poole
1d83803a18 Bump version number to 7.0.12 2024-04-15 10:27:43 +01:00
Tom Poole
aace97904c Bump version number to 7.0.11 2024-03-26 08:04:02 +00:00
Tom Poole
4555a8d1ad Bump version number to 7.0.10 2024-02-12 15:15:15 +00:00
reuk
047448fbce
Warnings: Add missing overrides 2024-01-30 11:37:30 +00:00
reuk
76b9b28658
OpenGL: Update compatibility headers
This also adds missing KHRONOS_APIENTRY qualifications to the debug
callback type, which fixes potential crashes when running debug Win32
builds.
2024-01-16 15:34:10 +00:00
attila
b0167985b4 OpenGLContext: Make getRenderingScale() sensitive to Component transforms
This also reverts commit c456f67c3f.
2024-01-03 14:02:42 +01:00
Tom Poole
61aa1fc4ab Bump version number to 7.0.9 2023-11-20 14:03:35 +00:00
attila
c456f67c3f Windows: Make OpenGLContext::getRenderingScale() insensitive to Component transforms
This makes it consistent between Windows and MacOS. This is restoring
the behaviour prior to 7e404118b5.
2023-11-02 09:16:08 +00:00
Tom Poole
45494e34d5 Bump version number to 7.0.8 2023-10-19 09:06:32 +01:00
reuk
8a9cb49c96
OpenGLContext: Add missing explicit keywords 2023-10-11 14:24:17 +01:00
reuk
9bf785f221
OpenGLContext: Re-bind previous program after copying texture 2023-10-11 14:24:17 +01:00
Tom Poole
6bf9bb9a2e Add final specifiers in implementation files 2023-10-10 16:12:38 +01:00
Anthony Nicholls
158220ddfa Formatting: Use nested namespace definitions 2023-10-09 14:49:18 +01:00
Tom Poole
4153d59e39 Formatting 2023-10-02 15:42:20 +01:00
Tom Poole
7d45d498b9 Removed some superfluous consts from definitions 2023-09-20 16:31:10 +01:00
Tom Poole
9b041f3d74 Add a base clang-tidy configuration 2023-09-18 11:24:19 +01:00
Tom Poole
b769982bb5 Bump version number to 7.0.7 2023-08-23 09:06:58 +01:00
Tom Poole
d5cb08e60e Bump version number to 7.0.6 2023-08-03 10:58:48 +01:00
reuk
17deafbb0d
OpenGL: Ensure a VAO is bound before calling user render callback 2023-08-01 13:41:30 +01:00
reuk
f012f8c280
OpenGL: Keep track of previously-attached VAOs and buffers when creating additional GL-backed Graphics contexts
Previously, code such as the following (where MyGLComponent is rendering
using an OpenGLContext) could result in GL errors, as the destruction of
the inner context unbound the array buffer and element array buffer
after use, instead of setting them to the previous values set up by the
outer context.

Additionally, a VAO was only set up in the OpenGLContext, so rendering
into a GL-backed LowLevel graphics context could fail if no VAO was
bound.

    void MyGLComponent::paint (juce::Graphics& g)
    {
        juce::Image image { juce::Image::PixelFormat::ARGB, width, height, false, juce::OpenGLImageType() };

        {
            juce::Graphics innerContext { image };
            // draw into innerContext
        }

        g.drawImage (image, juce::Rectangle<float> { width, height });
    }
2023-06-08 15:26:24 +01:00
reuk
c2949edda0
OpenGL: Avoid taking X lock when swapping buffers to reduce lock contention 2023-06-01 18:51:25 +01:00
reuk
ed15516087
OpenGL: Use newer GLX APIs 2023-06-01 18:51:06 +01:00
reuk
722b552657
OpenGL: Avoid signed integer truncation when computing frame time differences 2023-06-01 18:49:32 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible 2023-04-04 19:55:11 +01:00
Anthony Nicholls
05d5c94990
Native: Rename all native files for improved consistency 2023-04-04 19:54:29 +01:00
reuk
16929c26f7
OpenGLContext: Avoid calling NSView::window from displaylink thread 2023-03-14 19:08:07 +00:00
reuk
af2a4a7e2a
OpenGL: Avoid enabling GL_TEXTURE_2D in core profile contexts 2023-03-06 12:35:26 +00:00
reuk
42021e3e9a
OpenGL: Avoid rare race on members used to compute frame times 2023-03-02 12:03:31 +00:00
reuk
c08a1827b5
OpenGL: Ensure flushBuffer can't be called simultaneously from multiple threads on macOS 10.13 or earlier
On these platforms, calling flushBuffer from multiple threads
simultaneously will lead to deadlocks.
2023-03-02 12:03:31 +00:00
reuk
ae45bb4c35
OpenGLContext: Fix signature of DEBUGPROC 2023-02-22 21:00:18 +00:00