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.
2 years ago
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
2 years ago
Tom Poole
2ec861d99e
Update licensing banners to JUCE 7
3 years ago
Tom Poole
dea3fe60e4
Update copyright banners
3 years ago
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 */ });
3 years ago
reuk
7ac6911ccc
Windows: Fix clang/gnu compiler warnings
4 years ago
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
4 years ago
reuk
54423f6583
OpenGL: Add GLEW-inspired dynamic function loading
4 years ago
reuk
394c4fd475
Clang: Fix warnings when building with clang 10
4 years ago
ed
009d685179
Updated all license headers
4 years ago
ed
d510b73cdf
Normalised all whitespace before args in std::function
5 years ago
Tom Poole
894e7d2bd2
Updated all license headers
5 years ago
Tom Poole
2d16374b14
Updated all license headers
5 years ago
reuk
327f817b9b
Copyrights: Update commercial/gpl headers to be gpl-only
5 years ago
jules
f58eacc135
Added more unique_ptr use, for functions that create LowLevelGraphicsContext or ImageType objects.
6 years ago
jules
359132ed55
More zero -> nullptr fixes
6 years ago
jules
95a3f0b039
Whitespace
6 years ago
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
6 years ago
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
7 years ago
jules
49ddaddbae
Added a lambda callback to OpenGLGraphicsContextCustomShader to allow custom set-up when the shader is activated
7 years ago
jules
38295f332b
Converted some old typedefs to using declarations
7 years ago
Tom Poole
ab863a6dc2
Replaced all usage of ScopedPointer with std::unique_ptr
7 years ago
jules
1a60fa9765
More ScopedPointer/unique_ptr compatibility work
7 years ago
jules
a9eafbc90f
Some tidying up in AffineTransform, and added a new fromTargetPoints method
7 years ago
jules
a9bc970ff8
Made the openGL 2D renderer limit the size of its vertex buffers to avoid problems on systems with limited GPUs
7 years ago
jules
9d56e2990d
Optimised the GL renderer to avoid splitting large rectangles into horizontal strips unnecessarily
7 years ago
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)
7 years ago
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
7 years ago
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
7 years ago
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
8 years ago
jules
38d49a5ee7
Modernised a few RectangleList iterators
8 years ago
hogliux
9f3fb1c0a6
Added a compiler error if your compiler is too old and removed numerous code checks for old compilers which are now deprecated
8 years ago
hogliux
082b15969f
Fix OpenGL 2D custom shader crash on newer Android devices
9 years ago
jules
2a1234b6ac
Simplified some inter-module dependencies and exception-catching fallbacks
9 years ago
jules
9f7eb07ce5
OpenGL: changed image invalidation to allow non-GL threads that draw into images to correctly invalidate the GPU-cached version
9 years ago
hogliux
c7b8e77031
Update copyright notice
9 years ago
Timur Doumler
be9a2ff1bb
Implemented support for Android OpenGL native ARGB pixel format.
10 years ago
Fabian Renn-Giles
ad3c04cdac
Remove colour swizzle to fix inverted colour bug on Samsung phones
10 years ago
Fabian Renn-Giles
bb70069626
Remove colour swizzle to fix inverted colour bug on Samsung phones
10 years ago
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.
10 years ago
jules
fd7b9a8542
Workaround for leak of openGL textures when Images are deleted without an active GL context.
10 years ago
jules
2f1ef234ce
Tightened up a few places where numeric conversion warnings could happen.
11 years ago
jules
af0276b698
Refactored some openGL 2D shaders to move some interpolation from the fragment shader into varying variables.
11 years ago
jules
e449f1a8af
Workarounds for a couple of MSVC quirks.
11 years ago
jules
b1b08106bf
Updated OpenGLGraphicsContext to be able to use GL3 contexts.
11 years ago
jules
fa2b42a742
Android GL fixes.
11 years ago
jules
56f7676601
Refactored the OpenGLGraphicsContextCustomShader class and added a demo for it.
11 years ago
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.
11 years ago
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.
11 years ago
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.
11 years ago