diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-06 17:27:00 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-12 11:03:54 +0100 |
commit | 2a25270298f358f815b22c87ece74fd3f37a42b5 (patch) | |
tree | 37e8e3c08f2531c98c962aba6fdb227ed6212e2c /src/mbgl/util/offscreen_texture.cpp | |
parent | 60ceac5efc3d77199f773f08400fe1d53d5a1b90 (diff) | |
download | qtlocation-mapboxgl-2a25270298f358f815b22c87ece74fd3f37a42b5.tar.gz |
[core] move Texture related enums to gfx namespace
Diffstat (limited to 'src/mbgl/util/offscreen_texture.cpp')
-rw-r--r-- | src/mbgl/util/offscreen_texture.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/util/offscreen_texture.cpp b/src/mbgl/util/offscreen_texture.cpp index 03f555eae0..bf42f98ceb 100644 --- a/src/mbgl/util/offscreen_texture.cpp +++ b/src/mbgl/util/offscreen_texture.cpp @@ -11,21 +11,21 @@ OffscreenTexture& OffscreenTexture::operator=(OffscreenTexture&&) = default; class OffscreenTexture::Impl { public: - Impl(gl::Context& context_, const Size size_, const gl::TextureType type_) + Impl(gl::Context& context_, const Size size_, const gfx::TextureChannelDataType type_) : context(context_), size(std::move(size_)), type(type_) { assert(!size.isEmpty()); } Impl(gl::Context& context_, const Size size_, gl::Renderbuffer<gl::RenderbufferType::DepthComponent>& depth_, - const gl::TextureType type_) + const gfx::TextureChannelDataType type_) : context(context_), size(std::move(size_)), depth(&depth_), type(type_) { assert(!size.isEmpty()); } void bind() { if (!framebuffer) { - texture = context.createTexture(size, gl::TextureFormat::RGBA, 0, type); + texture = context.createTexture(size, gfx::TexturePixelType::RGBA, 0, type); if (depth) { framebuffer = context.createFramebuffer(*texture, *depth); } else { @@ -59,12 +59,12 @@ private: optional<gl::Framebuffer> framebuffer; optional<gl::Texture> texture; gl::Renderbuffer<gl::RenderbufferType::DepthComponent>* depth = nullptr; - const gl::TextureType type; + const gfx::TextureChannelDataType type; }; OffscreenTexture::OffscreenTexture(gl::Context& context, const Size size, - const gl::TextureType type) + const gfx::TextureChannelDataType type) : impl(std::make_unique<Impl>(context, std::move(size), type)) { assert(!size.isEmpty()); } @@ -72,7 +72,7 @@ OffscreenTexture::OffscreenTexture(gl::Context& context, OffscreenTexture::OffscreenTexture(gl::Context& context, const Size size, gl::Renderbuffer<gl::RenderbufferType::DepthComponent>& renderbuffer, - const gl::TextureType type) + const gfx::TextureChannelDataType type) : impl(std::make_unique<Impl>(context, std::move(size), renderbuffer, type)) { assert(!size.isEmpty()); } |