Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Store depth RBO as ptr on OffscreenTexture so that shared RBO does no…
Browse files Browse the repository at this point in the history
…t get destroyed when removing a layer
  • Loading branch information
Lauren Budorick committed Sep 13, 2017
1 parent 84ec9e2 commit 615328a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mbgl/util/offscreen_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OffscreenTexture::Impl {
Impl(gl::Context& context_,
const Size size_,
gl::Renderbuffer<gl::RenderbufferType::DepthComponent>& depth_)
: context(context_), size(std::move(size_)), depth(std::move(depth_)) {
: context(context_), size(std::move(size_)), depth(&depth_) {
assert(!size.isEmpty());
}

Expand Down Expand Up @@ -57,7 +57,7 @@ class OffscreenTexture::Impl {
const Size size;
optional<gl::Framebuffer> framebuffer;
optional<gl::Texture> texture;
optional<gl::Renderbuffer<gl::RenderbufferType::DepthComponent>> depth;
gl::Renderbuffer<gl::RenderbufferType::DepthComponent>* depth = nullptr;
};

OffscreenTexture::OffscreenTexture(gl::Context& context,
Expand Down

0 comments on commit 615328a

Please sign in to comment.