Destructor + bind buffer on makecurrent call.

This commit is contained in:
Dmitry Kunin 2013-12-25 17:46:37 +03:00 committed by Alex Zolotarev
parent 512bc05d31
commit b4029eb1a5
3 changed files with 10 additions and 0 deletions

View file

@ -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];
}

View file

@ -6,6 +6,7 @@
class iosOGLContextFactory: public OGLContextFactory
{
iosOGLContextFactory(CAEAGLLayer * layer);
~iosOGLContextFactory();
virtual OGLContext * getDrawContext();
virtual OGLContext * getResourcesUploadContext();

View file

@ -6,6 +6,12 @@ iosOGLContextFactory::iosOGLContextFactory(CAEAGLLayer * layer)
, m_uploadContext(NULL)
{}
iosOGLContextFactory::~iosOGLContextFactory()
{
delete m_drawContext;
delete m_uploadContext;
}
OGLContext * iosOGLContextFactory::getDrawContext()
{