fixed#1165: merged pull request 842
add project for ios
fixed memory leak in CCGLProgram
add pixel format I8 in CCTexture2D
update Director.pkg for LuaCocos2d
fixed#1158: Fixed a bug in CCParticleSystemQuad.
We need to check whether need to free quads and delete vbo/vao in the destructor.
CCParticleSystemQuad::~CCParticleSystemQuad()
{
if (NULL == m_pBatchNode) // important
{
CC_SAFE_FREE(m_pQuads);
CC_SAFE_FREE(m_pIndices);
glDeleteBuffers(2, &m_pBuffersVBO[0]);
glDeleteVertexArrays(1, &m_uVAOname);
}
}
We need to check whether need to free quads and delete vbo/vao in the destructor.
CCParticleSystemQuad::~CCParticleSystemQuad()
{
if (NULL == m_pBatchNode) // important
{
CC_SAFE_FREE(m_pQuads);
CC_SAFE_FREE(m_pIndices);
glDeleteBuffers(2, &m_pBuffersVBO[0]);
glDeleteVertexArrays(1, &m_uVAOname);
}
}
fixed#1155: Reverted CCDirector singleton to original implementation.
We must take care of the life cycle of CCDirector which should be firstly initialized and be destroyed at the last. Therefore, we should use a global object variable rather than a global object pointer variable.
fixed#1136: Fixed some bugs as follows:
1. Using std::string parameter as the key of CCDictionary
2. Deep copy for CCDictionary and CCArray, the classes of elements's type must implement copyWithZone.
3. Added toBool() function to CCString.
4. Retina support for all platforms.
5. Include "CCString.h" and "cocoa/CCNS.h" in cocos2d.h.
6. Added a new constructor(CCArray::CCArray(unsigned int capacity)) for CCArray. And fixed a bug in CCArray.
7. Fixed a memory leak in CCLabelBMFont.cpp.
8. Fixed an error in strings.xml.
1. Using std::string parameter as the key of CCDictionary
2. Deep copy for CCDictionary and CCArray, the classes of elements's type must implement copyWithZone.
3. Added toBool() function to CCString.
4. Retina support for all platforms.
5. Include "CCString.h" and "cocoa/CCNS.h" in cocos2d.h.
6. Added a new constructor(CCArray::CCArray(unsigned int capacity)) for CCArray. And fixed a bug in CCArray.
7. Fixed a memory leak in CCLabelBMFont.cpp.
8. Fixed an error in strings.xml.
issue #1094: Make ParticleBatchNode works on win32 and fixed some issues as follows:
1. renamed CCPoolManager::getInstance() to CCPoolManager::sharedPoolManager(), and added CCPoolManager::purgePoolManager() method. Using pointer rather than global variable to make a singleton.
2.fixed a memory leak in CCParticleSystem.
3.init CCSprite::m_pobBatchNode at the beginning of CCSprite::initWithTexture.
4.Add CCAssert in ccArrayRemoveObjectAtIndex.
5.Use new method to allocate CCDirector.