fix #188 , make eglDestroyContext after glDeleteTexture

This commit is contained in:
Walzer 2010-11-03 06:47:23 +00:00
parent b06f84d332
commit 200080aea0
2 changed files with 7 additions and 6 deletions

View File

@ -193,10 +193,10 @@ CCXEGLView::CCXEGLView(TApplication * pApp)
CCXEGLView::~CCXEGLView()
{
delete m_pEGL;
delete m_pSet;
delete m_pTouch;
CCX_SAFE_DELETE(m_pSet);
CCX_SAFE_DELETE(m_pTouch);
CCX_SAFE_DELETE(m_pDelegate);
CCX_SAFE_DELETE(m_pEGL);
}
Boolean CCXEGLView::AfterCreate(void)
@ -293,7 +293,6 @@ bool CCXEGLView::isOpenGLReady()
void CCXEGLView::release()
{
CCX_SAFE_DELETE(m_pEGL);
CloseWindow();
}

View File

@ -77,7 +77,9 @@ CCTexture2D::~CCTexture2D()
{
CCLOGINFO("cocos2d: deallocing CCTexture2D %u.", m_uName);
if(m_uName)
{
glDeleteTextures(1, &m_uName);
}
}
CCTexture2DPixelFormat CCTexture2D::getPixelFormat()