From a330309628026565cc951b02fca3a8521226b804 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 4 Mar 2013 11:53:06 +0800 Subject: [PATCH 1/2] issue #1686:add background color layer in CCTexture2DTest --- samples/Cpp/TestCpp/Classes/Texture2dTest/Texture2dTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/Cpp/TestCpp/Classes/Texture2dTest/Texture2dTest.cpp b/samples/Cpp/TestCpp/Classes/Texture2dTest/Texture2dTest.cpp index 961f65abe4..ed2e4cbfb5 100644 --- a/samples/Cpp/TestCpp/Classes/Texture2dTest/Texture2dTest.cpp +++ b/samples/Cpp/TestCpp/Classes/Texture2dTest/Texture2dTest.cpp @@ -193,7 +193,11 @@ void TextureDemo::onEnter() item1->setPosition(ccp(VisibleRect::center().x - item2->getContentSize().width*2, VisibleRect::bottom().y+item2->getContentSize().height/2)); item2->setPosition(ccp(VisibleRect::center().x, VisibleRect::bottom().y+item2->getContentSize().height/2)); item3->setPosition(ccp(VisibleRect::center().x + item2->getContentSize().width*2, VisibleRect::bottom().y+item2->getContentSize().height/2)); - addChild(menu, 1); + addChild(menu, 1); + + CCLayerColor *col = CCLayerColor::create(ccc4(128,128,128,255)); + addChild(col, -10); + CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo(); } From ae3c104fba642cc931d28e969cec42257ae460a5 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 5 Mar 2013 10:36:32 +0800 Subject: [PATCH 2/2] issue #1686:disable depth test by default --- cocos2dx/CCDirector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp index f8c063e197..e88c53478d 100644 --- a/cocos2dx/CCDirector.cpp +++ b/cocos2dx/CCDirector.cpp @@ -198,7 +198,7 @@ void CCDirector::setGLDefaultValues(void) setAlphaBlending(true); // XXX: Fix me, should enable/disable depth test according the depth format as cocos2d-iphone did // [self setDepthTest: view_.depthFormat]; - setDepthTest(true); + setDepthTest(false); setProjection(m_eProjection); // set other opengl default values