I’m developing a multi resolution game. I would like to keep the aspect ratio in all devices, so I decided to use kResolutionShowAll:
CCSize screenSize = pEGLView->getFrameSize(); CCSize designSize = CCSize(320, 480); CCEGLView::sharedOpenGLView()->setDesignResolutionSize (designSize.width, designSize.height, kResolutionShowAll);
I tried my game on iPad and it’s fine, it keeps the aspect ratio the game was designed for (1.5). Cocos fills the left and right border with a black block. Unafortunatelly, my game scene’s background are white.
Anybody knows a way to change the background’s color of the entire app?
I tried to change the color in the EAGLView:
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGB565 depthFormat: GL_DEPTH24_STENCIL8_OES preserveBackbuffer: NO sharegroup: nil multiSampling: NO numberOfSamples: 0]; [__glView setBackgroundColor:[UIColor whiteColor]];
But this doesn’t work. Any help will be appreciated!