diff options
Diffstat (limited to 'src/mbgl/gl/offscreen_texture.cpp')
-rw-r--r-- | src/mbgl/gl/offscreen_texture.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mbgl/gl/offscreen_texture.cpp b/src/mbgl/gl/offscreen_texture.cpp index 96d8b7e4c4..0b06fedf46 100644 --- a/src/mbgl/gl/offscreen_texture.cpp +++ b/src/mbgl/gl/offscreen_texture.cpp @@ -75,6 +75,15 @@ OffscreenTexture::OffscreenTexture( size, std::make_unique<OffscreenTextureResource>(context, size_, renderbuffer, type)) { } +bool OffscreenTexture::isRenderable() { + try { + getResource<OffscreenTextureResource>().bind(); + return true; + } catch (const std::runtime_error& ex) { + return false; + } +} + PremultipliedImage OffscreenTexture::readStillImage() { return getResource<OffscreenTextureResource>().readStillImage(); } |