@lgmugato wrote:
Hello I'm trying to get started with Cocos2d-x. When I run the game I get a crash. It works if I lower my background image resolution lower than the set resolution. I don't understand why it crashes when my image resolution is the same as the resolution I set. If someone could point me in the right direction. It would be much appreciated. I've been stuck on something that should be simple for awhile.
AppDelegate.cpp
CCEGLView::sharedOpenGLView()->setFrameSize(1360, 768); CCEGLView::sharedOpenGLView()->setViewPortInPoints(0.0f, 0.0f, 1360, 768); CCEGLView::sharedOpenGLView()->setDesignResolutionSize(1360, 768, ResolutionPolicy::kResolutionExactFit);
SplashScene.cpp
CCSprite *backgroundSprite = CCSprite::create("SplashScreenWIN32.png"); backgroundSprite->setPosition(CCPoint(visibleSize.width / 2 + origin.x, visibleSize.height / 2 + origin.y)); this->addChild(backgroundSprite);
Posts: 1
Participants: 1