diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-20 15:27:13 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-04-05 11:49:17 +0200 |
commit | be3b5917c169a6d5e6fcdc3cca15ca78e44dfd1d (patch) | |
tree | af780c3b78e5d2df7d8bee1f55a6f471a8047801 /src/mbgl/util | |
parent | 839f4687aacb98440f85660120173c9b9895f46a (diff) | |
download | qtlocation-mapboxgl-be3b5917c169a6d5e6fcdc3cca15ca78e44dfd1d.tar.gz |
[core] add generic base class for renderbuffers
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/offscreen_texture.cpp | 6 | ||||
-rw-r--r-- | src/mbgl/util/offscreen_texture.hpp | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/mbgl/util/offscreen_texture.cpp b/src/mbgl/util/offscreen_texture.cpp index be17aa06aa..d7d5c55564 100644 --- a/src/mbgl/util/offscreen_texture.cpp +++ b/src/mbgl/util/offscreen_texture.cpp @@ -17,7 +17,7 @@ public: } Impl(gl::Context& context_, const Size size_, - gl::Renderbuffer<gfx::RenderbufferPixelType::Depth>& depth_, + gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>& depth_, const gfx::TextureChannelDataType type_) : context(context_), size(std::move(size_)), depth(&depth_), type(type_) { assert(!size.isEmpty()); @@ -58,7 +58,7 @@ private: const Size size; optional<gl::Framebuffer> framebuffer; optional<gfx::Texture> texture; - gl::Renderbuffer<gfx::RenderbufferPixelType::Depth>* depth = nullptr; + gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>* depth = nullptr; const gfx::TextureChannelDataType type; }; @@ -72,7 +72,7 @@ OffscreenTexture::OffscreenTexture(gfx::Context& context, OffscreenTexture::OffscreenTexture(gfx::Context& context, const Size size, - gl::Renderbuffer<gfx::RenderbufferPixelType::Depth>& renderbuffer, + gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>& renderbuffer, const gfx::TextureChannelDataType type) // TODO: remove cast : impl(std::make_unique<Impl>(reinterpret_cast<gl::Context&>(context), std::move(size), renderbuffer, type)) { diff --git a/src/mbgl/util/offscreen_texture.hpp b/src/mbgl/util/offscreen_texture.hpp index 1f470bd1b0..db8cfac559 100644 --- a/src/mbgl/util/offscreen_texture.hpp +++ b/src/mbgl/util/offscreen_texture.hpp @@ -1,7 +1,6 @@ #pragma once -#include <mbgl/gl/types.hpp> -#include <mbgl/gl/renderbuffer.hpp> +#include <mbgl/gfx/renderbuffer.hpp> #include <mbgl/util/image.hpp> namespace mbgl { @@ -18,7 +17,7 @@ public: gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte); OffscreenTexture(gfx::Context&, Size size, - gl::Renderbuffer<gfx::RenderbufferPixelType::Depth>&, + gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>&, gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte); ~OffscreenTexture(); OffscreenTexture(OffscreenTexture&&); |