Fix GLES2 build

This commit is contained in:
Benau
2021-07-29 12:39:00 +08:00
parent 508eef4b81
commit 608f75e0af

View File

@@ -197,9 +197,11 @@ CIrrDeviceSDL::~CIrrDeviceSDL()
if (VideoDriver)
{
// Irrlicht calls gl function when quiting, but SDL has dropped its context, manually clear the loaded GL functions
#ifdef _IRR_COMPILE_WITH_OPENGL_
irr::video::COpenGLExtensionHandler* h = dynamic_cast<irr::video::COpenGLExtensionHandler*>(VideoDriver);
if (h)
h->clearGLExtenstions();
#endif
VideoDriver->drop();
VideoDriver = NULL;
}