reuk
f5a6c510c0
OpenGLFrameBuffer: Add a row order parameter for reading and writing pixels
...
This also fixes a bug where saving and restoring the framebuffer state
could unexpectedly apply a vertical flip to the buffer content.
2025-07-10 16:16:12 +01:00
reuk
1fcdd29bf9
OpenGL: Return image BitmapData in JUCE order rather than native order
...
JUCE convention is that BitmapData holds the lines of the image ordered
from top to bottom, but OpenGL orders lines in the reverse direction.
By returning a negative line stride, we can iterate lines in the
expected order as long as we always increment the current pointer
position by the line stride after processing each line.
2025-05-19 13:32:52 +01:00
reuk
2fbb72d960
OpenGLFrameBufferImage: Refactor and simplify BitmapData releaser
2025-01-23 12:21:33 +00:00
reuk
dcca72484f
Image: Update return type of getPixelData to avoid dangling pointers
2024-12-13 14:42:26 +00:00
Tom Poole
94d98a2b10
Update licensing information
2024-04-16 11:39:35 +01:00
Tom Poole
6bf9bb9a2e
Add final specifiers in implementation files
2023-10-10 16:12:38 +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
0223e44ae7
Image: Keep track of contiguous buffer size to avoid heap buffer overflows
...
In CoreGraphicsPixelData::createImage, image data was copied from a
BitmapData created from the Image passed into the function.
The BitmapData instance didn't keep track of the size of the buffer it
pointed to, so the buffer size was computed by multiplying the
BitmapData height by its line stride. However, if the BitmapData pointed
to a subsection of an image, the `data` pointer might be offset from
the allocated region, and `data + lineStride * height` would point past
the end of the allocated region. Trying to read/copy this range would
cause a heap buffer overflow at the end of the range.
This change adjusts BitmapData so that it keeps track of the size of the
allocated region. Taking a subsection of an image should subtract the
data pointer offset from the size of the allocated region.
2022-02-23 10:56:09 +00:00
ed
009d685179
Updated all license headers
2020-06-29 08:30:22 +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
Tom Poole
d8638fdd2a
OpenGL: Fixed an issue cloning OpenGLImageType images
2019-08-12 12:40:06 +01:00
Tom Poole
16dd26649a
Fixed some GCC compiler warnings and removed deprecated functions
2019-06-04 16:48:44 +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
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
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
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
jules
7c6f3d40b6
Tidied up some method calls involving HeapBlock
2017-09-05 16:06:57 +01:00
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
2017-04-27 14:43:04 +01:00
jules
021209e216
Changed ImagePixelData::clone to return a smart pointer rather than a raw one, to avoid a reference-count leak
2016-06-22 16:33:09 +01:00
hogliux
c7b8e77031
Update copyright notice
2015-07-22 15:59:34 +01: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
bdceeeb9f0
Xcode 5 compiler fix.
2013-09-20 11:59:26 +01:00
jules
2786eadaf9
Removed a few pedantic warnings.
2013-08-26 14:58:23 +01:00
jules
da3838db8a
Minor clean-ups.
2013-08-21 21:03:31 +01:00
jules
ebc0b2b727
Removed some warning settings that weren't supported by older GCCs. Also added workarounds for some spurious GCC warnings.
2013-07-30 21:47:15 +01:00
jules
60a0087114
Some internal component peer work.
2013-07-25 14:55:55 +01:00
jules
03c2801f3f
Copyright header update in all module files. juce_core modules are now ISC licensed. All other modules are GPLv2/3/AGPLv3
2013-06-13 13:17:12 +01:00
jules
b2240146ad
OpenGLImage fix.
2013-06-12 17:12:32 +01:00
jules
0ceeb573d8
Minor changes to avoid pedantic compiler warnings.
2012-12-04 21:39:15 +00:00
jules
02c0cd009c
Cleaned up some compiler warnings.
2012-12-03 15:04:08 +00:00
jules
c6299a08dc
Changed the return type of ImageType::create().
2012-07-18 10:43:27 +01:00
jules
04c2d6cfc1
Added some GL error handling and tweaks to support older PC builds.
2012-04-03 14:51:22 +01:00
jules
b338698e34
OpenGL: removed the fixed-function rendering code, replacing it with a simple software renderer that blits its results to the GL context. Removed the public OpenGLGraphicsContext class, replacing it with a createOpenGLGraphicsContext() function which returns an appropriate shader-based or software-based renderer object.
2012-03-15 11:13:38 +00:00
jules
4870ea28dd
Refactored the dynamically-loaded OpenGL extension functions from being static to being members of a specific context object. This entails lots of OpenGLContext references being passed around all over the place, and has meant that a few static helper functions are no longer available.
2012-01-04 16:36:30 +00:00
jules
43d9a4eb16
New class: ThreadLocalValue.
2011-12-22 11:40:34 +00:00
jules
a56a285e58
OpenGL work: renamed OpenGLGraphicsContext class, and made it use shaders for rendering where available.
2011-12-15 13:50:19 +00:00
jules
bbac5a8790
New class: OpenGLShaderProgram, and GL clean-ups.
2011-12-14 13:22:16 +00:00
jules
0b1cdf6ab1
Refactoring of image storage: new classes ImageType, ImagePixelData, SoftwareImageType, NativeImageType, OpenGLImageType.
2011-10-28 14:21:29 +01:00
jules
2f3f3b9639
More OpenGL classes (do not use yet - work in progress!)
2011-10-24 16:07:08 +01:00
jules
0e478bf131
More OpenGL work.
2011-10-20 22:26:55 +01:00
jules
f31dca5f2f
More OpenGL work.
2011-10-10 18:30:51 +01:00
jules
61f5ca11ab
More OpenGL fixes and work.
2011-10-09 18:27:30 +01:00
jules
4afcdaaaba
Added some OpenGL framebuffer functionality.
2011-10-08 22:30:13 +01:00
jules
5a45b4f4c6
New class: OpenGLFrameBufferImage, which wraps a framebuffer inside a juce Image.
2011-09-26 14:45:04 +01:00