Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop_fix

This commit is contained in:
samuele3hu 2014-04-11 14:35:07 +08:00
commit 2f1f09d5bf
6 changed files with 14 additions and 19 deletions

View File

@ -820,6 +820,9 @@ Developers:
ololomax
Fixed a potential crash in SceneReader::createNodeWithSceneFile
gaoxiaosong
Fixed a warning in cpCollision.c
Retired Core Developers:
WenSheng Yang

View File

@ -31,7 +31,7 @@ NS_CC_BEGIN
const char* cocos2dVersion()
{
return "3.0-rc1";
return "3.0";
}
NS_CC_END

View File

@ -38,11 +38,8 @@ static void convertIntToByteArray(int value, int* output)
QuadCommand::QuadCommand()
:_materialID(0)
,_textureID(0)
,_lastTextureID(0)
,_shader(nullptr)
,_lastShader(nullptr)
,_blendType(BlendFunc::DISABLE)
,_lastBlendType(BlendFunc::DISABLE)
,_quads(nullptr)
,_quadsCount(0)
{
@ -53,21 +50,18 @@ void QuadCommand::init(float globalOrder, GLuint textureID, GLProgram* shader, B
{
_globalOrder = globalOrder;
_textureID = textureID;
_blendType = blendType;
_shader = shader;
_quadsCount = quadCount;
_quads = quad;
_mv = mv;
if( _textureID != _lastTextureID || _blendType.src != _lastBlendType.src || _blendType.dst != _lastBlendType.dst || _shader != _lastShader) {
if( _textureID != textureID || _blendType.src != blendType.src || _blendType.dst != blendType.dst || _shader != shader) {
_textureID = textureID;
_blendType = blendType;
_shader = shader;
generateMaterialID();
_lastShader = _shader;
_lastBlendType = _blendType;
_lastTextureID = _textureID;
}
}

View File

@ -73,13 +73,10 @@ protected:
uint32_t _materialID;
GLuint _textureID;
GLuint _lastTextureID;
GLProgram* _shader;
GLProgram* _lastShader;
BlendFunc _blendType;
BlendFunc _lastBlendType;
V3F_C4B_T2F_Quad* _quads;
ssize_t _quadsCount;

View File

@ -261,7 +261,8 @@ int Renderer::createRenderQueue()
void Renderer::visitRenderQueue(const RenderQueue& queue)
{
ssize_t size = queue.size();
for (auto index = 0; index < size; ++index)
for (ssize_t index = 0; index < size; ++index)
{
auto command = queue[index];
auto commandType = command->getType();

View File

@ -241,9 +241,9 @@ ClosestPointsNew(const struct MinkowskiPoint v0, const struct MinkowskiPoint v1)
return points;
} else {
cpFloat d2 = cpvlength(p);
cpVect n = cpvmult(p, 1.0f/(d2 + CPFLOAT_MIN));
cpVect n2 = cpvmult(p, 1.0f/(d2 + CPFLOAT_MIN));
struct ClosestPoints points = {pa, pb, n, d2, id};
struct ClosestPoints points = {pa, pb, n2, d2, id};
return points;
}
}