コード例 #1
0
ファイル: OgreEGLContext.cpp プロジェクト: danyr/gamekit
 void EGLContext::_destroyInternalResources()
 {
     endCurrent();
     
     eglDestroyContext(mEglDisplay, mContext);
     EGL_CHECK_ERROR
     
     mContext = NULL;
 }
コード例 #2
0
BlackBerryEGLContext::~BlackBerryEGLContext() {
	GLES2RenderSystem *rs =
			static_cast<GLES2RenderSystem*>(Root::getSingleton().getRenderSystem());

	rs->_unregisterContext(this);

	if (mGlSurf != EGL_NO_SURFACE ) {
		eglDestroySurface(mGLDisplay, mEglConf);
	}

	if (mContext == eglGetCurrentContext()) {
		endCurrent();
	}

	if (mContext != NULL) {
		eglDestroyContext(mGLDisplay, mContext);
	}
	eglTerminate(mGLDisplay);
}