From 1d83229956862359f82b0ea83ec77c943f0dab51 Mon Sep 17 00:00:00 2001 From: akermen Date: Sat, 11 Apr 2015 10:32:33 +0300 Subject: [PATCH 1/2] =cocos2d namespace adder for CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES macro --- cocos/base/ccMacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/base/ccMacros.h b/cocos/base/ccMacros.h index ae1bd52505..d67d655727 100644 --- a/cocos/base/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -260,7 +260,7 @@ It should work same as apples CFSwapInt32LittleToHost(..) #define CC_INCREMENT_GL_DRAWS(__n__) Director::getInstance()->getRenderer()->addDrawnBatches(__n__) #define CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(__drawcalls__, __vertices__) \ do { \ - auto __renderer__ = Director::getInstance()->getRenderer(); \ + auto __renderer__ = cocos2d::Director::getInstance()->getRenderer(); \ __renderer__->addDrawnBatches(__drawcalls__); \ __renderer__->addDrawnVertices(__vertices__); \ } while(0) From 2957263c9db473575bc7d4b59a9723d5c5480287 Mon Sep 17 00:00:00 2001 From: akermen Date: Sat, 11 Apr 2015 10:45:19 +0300 Subject: [PATCH 2/2] =cocos2d namespace added macros --- cocos/base/ccMacros.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/base/ccMacros.h b/cocos/base/ccMacros.h index d67d655727..059edb6991 100644 --- a/cocos/base/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -124,7 +124,7 @@ do { \ */ #define CC_DIRECTOR_END() \ do { \ - Director *__director = Director::getInstance(); \ + Director *__director = cocos2d::Director::getInstance(); \ __director->end(); \ } while(0) @@ -132,7 +132,7 @@ do { \ On Mac it returns 1; On iPhone it returns 2 if RetinaDisplay is On. Otherwise it returns 1 */ -#define CC_CONTENT_SCALE_FACTOR() Director::getInstance()->getContentScaleFactor() +#define CC_CONTENT_SCALE_FACTOR() cocos2d::Director::getInstance()->getContentScaleFactor() /****************************/ /** RETINA DISPLAY ENABLED **/ @@ -257,7 +257,7 @@ It should work same as apples CFSwapInt32LittleToHost(..) Increments the GL Draws counts by one. The number of calls per frame are displayed on the screen when the Director's stats are enabled. */ -#define CC_INCREMENT_GL_DRAWS(__n__) Director::getInstance()->getRenderer()->addDrawnBatches(__n__) +#define CC_INCREMENT_GL_DRAWS(__n__) cocos2d::Director::getInstance()->getRenderer()->addDrawnBatches(__n__) #define CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(__drawcalls__, __vertices__) \ do { \ auto __renderer__ = cocos2d::Director::getInstance()->getRenderer(); \