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

This commit is contained in:
minggo 2012-11-22 10:13:03 +08:00
commit 94a9e1f53c
3 changed files with 22 additions and 10 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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