forked from organicmaps/organicmaps
Destructor + bind buffer on makecurrent call.
This commit is contained in:
parent
512bc05d31
commit
b4029eb1a5
3 changed files with 10 additions and 0 deletions
|
@ -36,6 +36,9 @@ void iosOGLContext::makeCurrent()
|
|||
void iosOGLContext::present()
|
||||
{
|
||||
ASSERT(m_nativeContext != NULL, ());
|
||||
ASSERT(m_renderBufferId, ());
|
||||
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, m_renderBufferId);
|
||||
[m_nativeContext presentRenderbuffer: GL_RENDERBUFFER];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
class iosOGLContextFactory: public OGLContextFactory
|
||||
{
|
||||
iosOGLContextFactory(CAEAGLLayer * layer);
|
||||
~iosOGLContextFactory();
|
||||
|
||||
virtual OGLContext * getDrawContext();
|
||||
virtual OGLContext * getResourcesUploadContext();
|
||||
|
|
|
@ -6,6 +6,12 @@ iosOGLContextFactory::iosOGLContextFactory(CAEAGLLayer * layer)
|
|||
, m_uploadContext(NULL)
|
||||
{}
|
||||
|
||||
iosOGLContextFactory::~iosOGLContextFactory()
|
||||
{
|
||||
delete m_drawContext;
|
||||
delete m_uploadContext;
|
||||
}
|
||||
|
||||
|
||||
OGLContext * iosOGLContextFactory::getDrawContext()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue