The OpenGL wrapper now handles context change

Fixed some bugs
Thanks to Raakz


Former-commit-id: f156ba7aa3307cccd83c9c02987dadad02cd8185
This commit is contained in:
Lynix
2013-06-21 01:28:11 +02:00
parent cca920e597
commit 00c2e824d1
7 changed files with 208 additions and 79 deletions

View File

@@ -59,7 +59,7 @@ bool NzRenderWindow::CopyToImage(NzImage* image) const
}
#endif
const NzContext* currentContext = NzContext::GetCurrent();
NzContext* currentContext = NzContext::GetCurrent();
if (m_context != currentContext)
{
if (!m_context->SetActive(true))
@@ -112,7 +112,7 @@ bool NzRenderWindow::CopyToTexture(NzTexture* texture) const
}
#endif
const NzContext* currentContext = NzContext::GetCurrent();
NzContext* currentContext = NzContext::GetCurrent();
if (m_context != currentContext)
{
if (!m_context->SetActive(true))