void GlContext::destroy() { eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(m_display, m_context); eglDestroySurface(m_display, m_surface); eglTerminate(m_display); m_context = NULL; eglClose(m_eglLibrary); }
void GlContext::destroy() { if (NULL != m_display) { eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(m_display, m_context); eglDestroySurface(m_display, m_surface); eglTerminate(m_display); m_context = NULL; } eglClose(m_eglLibrary); # if BX_PLATFORM_RPI bcm_host_deinit(); # endif // BX_PLATFORM_RPI }