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

118 commits

Author SHA1 Message Date
reuk
af2a4a7e2a
OpenGL: Avoid enabling GL_TEXTURE_2D in core profile contexts 2023-03-06 12:35:26 +00:00
reuk
a59cba010b
ColourGradient: Create lookup tables using non-premultiplied colours
The OpenGL renderer uses ColourGradient::createLookupTable to generate
gradient textures. However, the tweening method used was different to
the tweening used by CoreGraphics gradients, and by the software
renderer.

Gradient tweening is now computed using non-premultiplied colours, to
ensure consistency between gradients rendered using OpenGL, and with
other renderers.
2023-02-09 17:54:19 +00:00
reuk
02b5ab748a OpenGL: Add support for a few more OpenGL profiles
- 4.1 and 4.3 contexts can now be requested
- The requested context version is no longer ignored on Linux
- Debugging contexts are now enabled in Debug builds with GL 4.3
- Fixes a bug where glEnable(GL_TEXTURE_2D) was called in core profiles
2022-08-31 17:42:47 +01:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
3768349a05
Font: Make Font and TypefaceCache threadsafe
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 */ });
2021-09-23 10:28:47 +01:00
reuk
7ac6911ccc
Windows: Fix clang/gnu compiler warnings 2021-06-03 17:30:44 +01:00
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
2021-05-26 15:34:26 +01:00
reuk
54423f6583
OpenGL: Add GLEW-inspired dynamic function loading 2021-05-26 11:23:49 +01:00
reuk
394c4fd475 Clang: Fix warnings when building with clang 10 2020-07-01 10:00:43 +01:00
ed
009d685179 Updated all license headers 2020-06-29 08:30:22 +01:00
ed
d510b73cdf Normalised all whitespace before args in std::function 2020-06-05 09:37:49 +01:00
Tom Poole
894e7d2bd2 Updated all license headers 2020-04-23 17:30:39 +01:00
reuk
327f817b9b Copyrights: Update commercial/gpl headers to be gpl-only 2020-04-09 15:22:56 +01:00
jules
f58eacc135 Added more unique_ptr use, for functions that create LowLevelGraphicsContext or ImageType objects. 2019-05-15 12:08:38 +01:00
jules
359132ed55 More zero -> nullptr fixes 2018-10-09 11:42:55 +01:00
jules
95a3f0b039 Whitespace 2018-07-03 11:51:36 +01:00
jules
1e6bbb8da9 Added some methods to allow ReferenceCountedObjectPtrs to be constructed or copied from references as well as pointers - as well as increasing safety, this actually makes things a bit more efficient as it skips a nullptr check. Updated lots of places in the code that could take advantage of this 2018-07-03 11:51:13 +01:00
jules
49aa9c9db4 Added flag JUCE_STRICT_REFCOUNTEDPOINTER which is recommended to avoid accidental leaks when using ref-counted pointers. Enabled this flag in the demo projects, and used it to help tidy up some dubious smart-pointer use 2018-06-26 14:06:52 +01:00
jules
49ddaddbae Added a lambda callback to OpenGLGraphicsContextCustomShader to allow custom set-up when the shader is activated 2018-05-08 11:15:17 +01:00
jules
38295f332b Converted some old typedefs to using declarations 2018-05-03 09:59:05 +01:00
Tom Poole
ab863a6dc2 Replaced all usage of ScopedPointer with std::unique_ptr 2018-04-19 20:27:47 +01:00
jules
1a60fa9765 More ScopedPointer/unique_ptr compatibility work 2018-01-10 17:35:08 +00:00
jules
a9eafbc90f Some tidying up in AffineTransform, and added a new fromTargetPoints method 2017-12-20 12:58:20 +00:00
jules
a9bc970ff8 Made the openGL 2D renderer limit the size of its vertex buffers to avoid problems on systems with limited GPUs 2017-11-24 13:33:11 +00:00
jules
9d56e2990d Optimised the GL renderer to avoid splitting large rectangles into horizontal strips unnecessarily 2017-11-03 13:51:37 +00:00
jules
2dc9316420 Misc ScopedPointer changes to start using reset() and get() rather than assignments and casts (part of an ongoing drift towards more std::unique_ptr compatibility) 2017-11-01 17:41:06 +00:00
jules
369d59f656 Added a template to allow the HeapBlock class to be given signed ints or other types that are not size_t for its size parameters 2017-10-11 12:10:58 +01:00
jules
eda613c6db Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools 2017-09-08 08:59:55 +01:00
hogliux
b5afccc37c Updated file headers and the README with the JUCE 5 license 2017-04-27 14:43:04 +01:00
jules
38d49a5ee7 Modernised a few RectangleList iterators 2017-04-03 16:08:07 +01:00
hogliux
9f3fb1c0a6 Added a compiler error if your compiler is too old and removed numerous code checks for old compilers which are now deprecated 2017-02-01 17:18:06 +00:00
hogliux
082b15969f Fix OpenGL 2D custom shader crash on newer Android devices 2016-01-28 17:04:16 +00:00
jules
2a1234b6ac Simplified some inter-module dependencies and exception-catching fallbacks 2015-12-23 11:47:18 +00:00
jules
9f7eb07ce5 OpenGL: changed image invalidation to allow non-GL threads that draw into images to correctly invalidate the GPU-cached version 2015-11-24 11:31:26 +00:00
hogliux
c7b8e77031 Update copyright notice 2015-07-22 15:59:34 +01:00
Timur Doumler
be9a2ff1bb Implemented support for Android OpenGL native ARGB pixel format. 2015-05-05 17:44:10 +01:00
Fabian Renn-Giles
ad3c04cdac Remove colour swizzle to fix inverted colour bug on Samsung phones 2015-04-06 11:23:59 +01:00
jules
c240ca4eaf Added a method OpenGLContext::setImageCacheSize to provide explicit control over the amount of GPU space that is used for the internal image cache. 2015-03-26 18:12:07 +00:00
jules
fd7b9a8542 Workaround for leak of openGL textures when Images are deleted without an active GL context. 2014-10-27 10:28:46 +00:00
jules
2f1ef234ce Tightened up a few places where numeric conversion warnings could happen. 2014-07-10 18:57:24 +01:00
jules
af0276b698 Refactored some openGL 2D shaders to move some interpolation from the fragment shader into varying variables. 2014-05-30 11:25:09 +01:00
jules
e449f1a8af Workarounds for a couple of MSVC quirks. 2014-03-29 13:56:16 +00:00
jules
b1b08106bf Updated OpenGLGraphicsContext to be able to use GL3 contexts. 2014-03-13 10:57:03 +00:00
jules
fa2b42a742 Android GL fixes. 2014-02-24 20:29:13 +00:00
jules
56f7676601 Refactored the OpenGLGraphicsContextCustomShader class and added a demo for it. 2014-02-24 19:03:47 +00:00
jules
6427e11ae3 New class: OpenGLGraphicsContextCustomShader, which allows custom fragment shaders to be applied to a rectangular area during a normal 2D paint routine, to achieve per-pixel effects. 2014-02-24 11:04:38 +00:00
jules
80387e8cb5 Stripped out all the old openGL fixed-function code, and hard-coded the assumption that it'll be running on hardware that's capable of running GLSL. 2014-02-23 16:23:34 +00:00
jules
7a869d6528 Made the OpenGL graphics context keep a cache of textures it has recently used for Image rendering, to avoid repeatedly moving data to the GPU. 2014-02-20 16:38:49 +00:00
jules
d20279d1db Fix to the GL 2D renderer. Also removed the smaller limit on the GL buffer sizes used in win32. 2014-01-12 16:21:03 +00:00