Hi all! I’m very new to Cocos2d-x, currently using the 3.0 alpha (currently testing on OSX and Xcode), and I’m having some resource path issues. since I need direct access to raw pixel data, I decided to use an Image object instead of using the Spite + glReadPixels method. Basically, I’m creating my image like this:
_mapFile = new Image();
bool success = _mapFile->initWithImageFile("G5x5L01.PNG");
This fails because, apparently, Cocos2d can’t find the file. The actual file is located in Resources/levels/G5x5L01.PNG. If I create a Sprite, it gets created successfully, so it seems that there’s something specific to initWithImageFile that I’m missing.
I also tried to add all my searchPaths using FileUtils::getInstance()->setSearchPaths(); but doesn’t seem to fix anything. Am I missing something? Shouldn’t both methods look for the file in the same places?