Hi,
I am running the following code under Cocos2d-x 3.0
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview)
{
glview = GLView::create("My Game");
director->setOpenGLView(glview);
}
auto fileUtils = FileUtils::getInstance();
std::vector<std::string> searchPaths;
searchPaths.push_back("Images");
fileUtils->setSearchPaths(searchPaths);
// Add configuration files for sprites and objects
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("sprites.plist","sprites.png");
GB2ShapeCache::sharedGB2ShapeCache()->addShapesWithFile("objects.plist");
// turn on display FPS
director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this
director->setAnimationInterval(1.0 / 60);
// create a scene. it's an autorelease object
auto scene = GameLayer::createScene();
// run
director->runWithScene(scene);
return true;
}
I tested this code with VS2012 and iOS. However, when I run this on Mac OS X I get the following error:
**
libpng warning: iCCP: known incorrect sRGB profile
cocos2d: cocos2d: fullPathForFilename: No file found at sprites.png. Possible missing file.
cocos2d: cocos2d: fullPathForFilename: No file found at sprites.png. Possible missing file.
cocos2d: cocos2d: fullPathForFilename: No file found at sprites.png. Possible missing file.
cocos2d: Get data from file(sprites.png) failed!
cocos2d: cocos2d: SpriteFrameCache: couldn’t load texture file. File not found sprites.png
cocos2d: cocos2d: fullPathForFilename: No file found at objects.plist. Possible missing file.
**
DO you have any idea of what I am doing wrong?
Thanks