mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
LowLevelGraphicsContext: Add preferred image type for temporary images
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
This commit is contained in:
parent
bf940ae42a
commit
250abe9cf4
6 changed files with 40 additions and 1 deletions
|
|
@ -1839,6 +1839,11 @@ struct ShaderContext final : public RenderingHelpers::StackBasedLowLevelGraphics
|
|||
static_cast<SavedState&> (*stack).fillRectWithCustomShader (shader, area);
|
||||
}
|
||||
|
||||
std::unique_ptr<ImageType> getPreferredImageTypeForTemporaryImages() const override
|
||||
{
|
||||
return std::make_unique<OpenGLImageType>();
|
||||
}
|
||||
|
||||
GLState glState;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ShaderContext)
|
||||
|
|
@ -1850,7 +1855,7 @@ struct NonShaderContext final : public LowLevelGraphicsSoftwareRenderer
|
|||
: LowLevelGraphicsSoftwareRenderer (im), target (t), image (im)
|
||||
{}
|
||||
|
||||
~NonShaderContext()
|
||||
~NonShaderContext() override
|
||||
{
|
||||
JUCE_CHECK_OPENGL_ERROR
|
||||
auto previousFrameBufferTarget = OpenGLFrameBuffer::getCurrentFrameBufferTarget();
|
||||
|
|
@ -1883,6 +1888,11 @@ struct NonShaderContext final : public LowLevelGraphicsSoftwareRenderer
|
|||
JUCE_CHECK_OPENGL_ERROR
|
||||
}
|
||||
|
||||
std::unique_ptr<ImageType> getPreferredImageTypeForTemporaryImages() const noexcept override
|
||||
{
|
||||
return std::make_unique<OpenGLImageType>();
|
||||
}
|
||||
|
||||
private:
|
||||
Target target;
|
||||
Image image;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue