diff --git a/drape/oglcontext.hpp b/drape/oglcontext.hpp index 6d2ef6ed2c..991922f63d 100644 --- a/drape/oglcontext.hpp +++ b/drape/oglcontext.hpp @@ -5,4 +5,7 @@ class OGLContext public: virtual void present() = 0; virtual void makeCurrent() = 0; + virtual void setDefaultFramebuffer() = 0; + + virtual ~OGLContext() {} }; diff --git a/drape_head/qtoglcontext.cpp b/drape_head/qtoglcontext.cpp index a93b7fcac1..7d26e2459b 100644 --- a/drape_head/qtoglcontext.cpp +++ b/drape_head/qtoglcontext.cpp @@ -31,3 +31,9 @@ void QtOGLContext::present() m_nativeContext->makeCurrent(m_surface); m_nativeContext->swapBuffers(m_surface); } + + +void QtOGLContext::setDefaultFramebuffer() +{ + glBindFramebuffer(GL_FRAMEBUFFER, 0); +} diff --git a/drape_head/qtoglcontext.hpp b/drape_head/qtoglcontext.hpp index 0889028af5..cee6060d3f 100644 --- a/drape_head/qtoglcontext.hpp +++ b/drape_head/qtoglcontext.hpp @@ -12,6 +12,7 @@ public: virtual void present(); virtual void makeCurrent(); + virtual void setDefaultFramebuffer(); private: QOpenGLContext * m_nativeContext; diff --git a/iphone/Maps/Platform/opengl/iosOGLContext.h b/iphone/Maps/Platform/opengl/iosOGLContext.h new file mode 100644 index 0000000000..14720a4bad --- /dev/null +++ b/iphone/Maps/Platform/opengl/iosOGLContext.h @@ -0,0 +1,14 @@ +// +// iosOGLContext.h +// Maps +// +// Created by Dmitry Kunin on 25.12.13. +// Copyright (c) 2013 MapsWithMe. All rights reserved. +// + +#ifndef __Maps__iosOGLContext__ +#define __Maps__iosOGLContext__ + +#include + +#endif /* defined(__Maps__iosOGLContext__) */ diff --git a/iphone/Maps/Platform/opengl/iosOGLContext.mm b/iphone/Maps/Platform/opengl/iosOGLContext.mm new file mode 100644 index 0000000000..6ef9a74572 --- /dev/null +++ b/iphone/Maps/Platform/opengl/iosOGLContext.mm @@ -0,0 +1,9 @@ +// +// iosOGLContext.cpp +// Maps +// +// Created by Dmitry Kunin on 25.12.13. +// Copyright (c) 2013 MapsWithMe. All rights reserved. +// + +#include "iosOGLContext.h" diff --git a/iphone/Maps/Platform/opengl/iosOGLContextFactory.h b/iphone/Maps/Platform/opengl/iosOGLContextFactory.h new file mode 100644 index 0000000000..8c80992c7d --- /dev/null +++ b/iphone/Maps/Platform/opengl/iosOGLContextFactory.h @@ -0,0 +1,14 @@ +// +// iosOGLContextFactory.h +// Maps +// +// Created by Dmitry Kunin on 25.12.13. +// Copyright (c) 2013 MapsWithMe. All rights reserved. +// + +#ifndef __Maps__iosOGLContextFactory__ +#define __Maps__iosOGLContextFactory__ + +#include + +#endif /* defined(__Maps__iosOGLContextFactory__) */ diff --git a/iphone/Maps/Platform/opengl/iosOGLContextFactory.mm b/iphone/Maps/Platform/opengl/iosOGLContextFactory.mm new file mode 100644 index 0000000000..fed450bd17 --- /dev/null +++ b/iphone/Maps/Platform/opengl/iosOGLContextFactory.mm @@ -0,0 +1,9 @@ +// +// iosOGLContextFactory.cpp +// Maps +// +// Created by Dmitry Kunin on 25.12.13. +// Copyright (c) 2013 MapsWithMe. All rights reserved. +// + +#include "iosOGLContextFactory.h"