From b23409a9420783a2c8a3d25652e98b3793e8146d Mon Sep 17 00:00:00 2001 From: liswei Date: Wed, 29 Jun 2011 15:24:04 +0800 Subject: [PATCH] fixed #545 [Wophone] The effect of ChipmunkTest is wrong. reset glOrthof param value in wophone --- tests/tests/ChipmunkTest/cocos2dChipmunkDemo.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/tests/ChipmunkTest/cocos2dChipmunkDemo.cpp b/tests/tests/ChipmunkTest/cocos2dChipmunkDemo.cpp index 8e591941b3..1e19c23c70 100644 --- a/tests/tests/ChipmunkTest/cocos2dChipmunkDemo.cpp +++ b/tests/tests/ChipmunkTest/cocos2dChipmunkDemo.cpp @@ -481,10 +481,18 @@ void ChipmunkTestLayer::onEnter() glMatrixMode(GL_PROJECTION); glLoadIdentity(); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WOPHONE) // portraint + //glOrthof(-320/factor, 320/factor, -480/factor, 480/factor, -1.0f, 1.0f); + // landscape + glOrthof(-320/factor, 320/factor, 0/factor, 960/factor, 1.0f, -1.0f); +#else + // portraint // glOrthof(-320/factor, 320/factor, -480/factor, 480/factor, -1.0f, 1.0f); - // landscape - glOrthof(-480/factor, 480/factor, -320/factor, 320/factor, 1.0f, -1.0f); + // landscape + glOrthof(-480/factor, 480/factor, -320/factor, 320/factor, 1.0f, -1.0f); + +#endif glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -496,7 +504,7 @@ void ChipmunkTestLayer::onEnter() glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE); glHint(GL_POINT_SMOOTH_HINT, GL_DONT_CARE); - glLineWidth(1.5f); + glLineWidth(1.5f); } void ChipmunkTestLayer::onExit()