[core] correctly set the framebuffer size on retina screens

Also asserts in Debug mode that the internal state and the OpenGL state are identical
This commit is contained in:
Konstantin Käfer
2016-10-31 19:45:17 +01:00
parent dfd4057121
commit f7801e5d82
7 changed files with 35 additions and 14 deletions

View File

@@ -132,7 +132,9 @@ void GLFWView::setMap(mbgl::Map *map_) {
void GLFWView::updateViewBinding() {
getContext().bindFramebuffer.setCurrentValue(0);
assert(mbgl::gl::value::BindFramebuffer::Get() == getContext().bindFramebuffer.getCurrentValue());
getContext().viewport.setCurrentValue({ 0, 0, getFramebufferSize() });
assert(mbgl::gl::value::Viewport::Get() == getContext().viewport.getCurrentValue());
}
void GLFWView::bind() {