diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index 73e4dcbe72..fc7656de6a 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -394,9 +394,9 @@ void CCRenderTexture::beginWithClear(float r, float g, float b, float a, float d this->begin(); // save clear color - GLfloat clearColor[4]; - GLfloat depthClearValue; - int stencilClearValue; + GLfloat clearColor[4] = {0.0f}; + GLfloat depthClearValue = 0.0f; + int stencilClearValue = 0; if (flags & GL_COLOR_BUFFER_BIT) { @@ -512,7 +512,6 @@ void CCRenderTexture::visit() if (m_pGrid && m_pGrid->isActive()) { m_pGrid->afterDraw(this); - transformAncestors(); } kmGLPopMatrix(); @@ -528,9 +527,9 @@ void CCRenderTexture::draw() if (m_uClearFlags) { - GLfloat oldClearColor[4]; - GLfloat oldDepthClearValue; - GLint oldStencilClearValue; + GLfloat oldClearColor[4] = {0.0f}; + GLfloat oldDepthClearValue = 0.0f; + GLint oldStencilClearValue = 0; // backup and set if (m_uClearFlags & GL_COLOR_BUFFER_BIT) diff --git a/cocos2dx/platform/win32/CCEGLView.cpp b/cocos2dx/platform/win32/CCEGLView.cpp index 3dc8a05be3..264ac658ba 100644 --- a/cocos2dx/platform/win32/CCEGLView.cpp +++ b/cocos2dx/platform/win32/CCEGLView.cpp @@ -78,14 +78,14 @@ static void SetupPixelFormat(HDC hDC) PFD_DRAW_TO_WINDOW | // render to window PFD_DOUBLEBUFFER, // support double-buffering PFD_TYPE_RGBA, // color type - 32, // prefered color depth + 32, // preferred color depth 0, 0, 0, 0, 0, 0, // color bits (ignored) 0, // no alpha buffer 0, // alpha bits (ignored) 0, // no accumulation buffer 0, 0, 0, 0, // accum bits (ignored) - 16, // depth buffer - 0, // no stencil buffer + 24, // depth buffer + 8, // no stencil buffer 0, // no auxiliary buffers PFD_MAIN_PLANE, // main layer 0, // reserved @@ -248,6 +248,9 @@ bool CCEGLView::initGL() return false; } + // Enable point size by default on windows. + glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + return true; } diff --git a/extensions/physics_nodes/CCPhysicsSprite.cpp b/extensions/physics_nodes/CCPhysicsSprite.cpp index 932b36231b..d8f37e891a 100644 --- a/extensions/physics_nodes/CCPhysicsSprite.cpp +++ b/extensions/physics_nodes/CCPhysicsSprite.cpp @@ -154,6 +154,16 @@ bool CCPhysicsSprite::isDirty() return true; } +bool CCPhysicsSprite::isIgnoreBodyRotation() const +{ + return m_bIgnoreBodyRotation; +} + +void CCPhysicsSprite::setIgnoreBodyRotation(bool bIgnoreBodyRotation) +{ + m_bIgnoreBodyRotation = bIgnoreBodyRotation; +} + #if CC_ENABLE_CHIPMUNK_INTEGRATION cpBody* CCPhysicsSprite::getBody() const