summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/offscreen_texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/offscreen_texture.cpp')
-rw-r--r--src/mbgl/gl/offscreen_texture.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/mbgl/gl/offscreen_texture.cpp b/src/mbgl/gl/offscreen_texture.cpp
index 5feef95edf..92f80a87b4 100644
--- a/src/mbgl/gl/offscreen_texture.cpp
+++ b/src/mbgl/gl/offscreen_texture.cpp
@@ -15,23 +15,11 @@ public:
assert(!size.isEmpty());
}
- OffscreenTextureResource(gl::Context& context_,
- const Size size_,
- gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>& depth_,
- const gfx::TextureChannelDataType type_)
- : context(context_), size(size_), depth(&depth_), type(type_) {
- assert(!size.isEmpty());
- }
-
void bind() override {
if (!framebuffer) {
assert(!texture);
texture = context.createTexture(size, gfx::TexturePixelType::RGBA, type);
- if (depth) {
- framebuffer = context.createFramebuffer(*texture, *depth);
- } else {
- framebuffer = context.createFramebuffer(*texture);
- }
+ framebuffer = context.createFramebuffer(*texture);
} else {
context.bindFramebuffer = framebuffer->framebuffer;
}
@@ -56,7 +44,6 @@ private:
gl::Context& context;
const Size size;
optional<gfx::Texture> texture;
- gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>* depth = nullptr;
const gfx::TextureChannelDataType type;
optional<gl::Framebuffer> framebuffer;
};
@@ -67,15 +54,6 @@ OffscreenTexture::OffscreenTexture(gl::Context& context,
: gfx::OffscreenTexture(size, std::make_unique<OffscreenTextureResource>(context, size_, type)) {
}
-OffscreenTexture::OffscreenTexture(
- gl::Context& context,
- const Size size_,
- gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>& renderbuffer,
- const gfx::TextureChannelDataType type)
- : gfx::OffscreenTexture(
- size, std::make_unique<OffscreenTextureResource>(context, size_, renderbuffer, type)) {
-}
-
bool OffscreenTexture::isRenderable() {
try {
getResource<OffscreenTextureResource>().bind();