diff --git a/src/mbgl/gfx/context.hpp b/src/mbgl/gfx/context.hpp index 53cd3186422..64eddf3e5a6 100644 --- a/src/mbgl/gfx/context.hpp +++ b/src/mbgl/gfx/context.hpp @@ -42,11 +42,6 @@ class Context { virtual std::unique_ptr createOffscreenTexture(Size, TextureChannelDataType = TextureChannelDataType::UnsignedByte) = 0; - virtual std::unique_ptr - createOffscreenTexture(Size, - Renderbuffer&, - TextureChannelDataType = TextureChannelDataType::UnsignedByte) = 0; - public: // Creates an empty texture with the specified dimensions. Texture createTexture(const Size size, diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 626e1f4b66d..3e88624d4fb 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -437,13 +437,6 @@ Context::createOffscreenTexture(const Size size, const gfx::TextureChannelDataTy return std::make_unique(*this, size, type); } -std::unique_ptr -Context::createOffscreenTexture(const Size size, - gfx::Renderbuffer& depth, - gfx::TextureChannelDataType type) { - return std::make_unique(*this, size, depth, type); -} - std::unique_ptr Context::createDrawScopeResource() { return std::make_unique(createVertexArray()); } diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index c7e182f192c..80278718d16 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -181,10 +181,6 @@ class Context final : public gfx::Context { std::unique_ptr createOffscreenTexture( Size, gfx::TextureChannelDataType = gfx::TextureChannelDataType::UnsignedByte) override; - std::unique_ptr createOffscreenTexture( - Size, - gfx::Renderbuffer&, - gfx::TextureChannelDataType = gfx::TextureChannelDataType::UnsignedByte) override; std::unique_ptr createTextureResource(Size, gfx::TexturePixelType, gfx::TextureChannelDataType) override; diff --git a/src/mbgl/gl/offscreen_texture.cpp b/src/mbgl/gl/offscreen_texture.cpp index 5feef95edfb..92f80a87b43 100644 --- a/src/mbgl/gl/offscreen_texture.cpp +++ b/src/mbgl/gl/offscreen_texture.cpp @@ -15,23 +15,11 @@ class OffscreenTextureResource final : public gl::RenderableResource { assert(!size.isEmpty()); } - OffscreenTextureResource(gl::Context& context_, - const Size size_, - gfx::Renderbuffer& 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 @@ class OffscreenTextureResource final : public gl::RenderableResource { gl::Context& context; const Size size; optional texture; - gfx::Renderbuffer* depth = nullptr; const gfx::TextureChannelDataType type; optional framebuffer; }; @@ -67,15 +54,6 @@ OffscreenTexture::OffscreenTexture(gl::Context& context, : gfx::OffscreenTexture(size, std::make_unique(context, size_, type)) { } -OffscreenTexture::OffscreenTexture( - gl::Context& context, - const Size size_, - gfx::Renderbuffer& renderbuffer, - const gfx::TextureChannelDataType type) - : gfx::OffscreenTexture( - size, std::make_unique(context, size_, renderbuffer, type)) { -} - bool OffscreenTexture::isRenderable() { try { getResource().bind(); diff --git a/src/mbgl/gl/offscreen_texture.hpp b/src/mbgl/gl/offscreen_texture.hpp index 07da4f57e26..5f3863d3e9c 100644 --- a/src/mbgl/gl/offscreen_texture.hpp +++ b/src/mbgl/gl/offscreen_texture.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include namespace mbgl { namespace gl { @@ -13,10 +13,6 @@ class OffscreenTexture final : public gfx::OffscreenTexture { OffscreenTexture(gl::Context&, Size size, gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte); - OffscreenTexture(gl::Context&, - Size size, - gfx::Renderbuffer&, - gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte); bool isRenderable() override;