How shall I set the windows dimensions in win32 port of the game in cocos2dx rc0?
I was looking in CCApplication.h, GL.h in cocos2d/cocos/2d/platform/win32, but couldnt find any function.
How shall I set the windows dimensions in win32 port of the game in cocos2dx rc0?
I was looking in CCApplication.h, GL.h in cocos2d/cocos/2d/platform/win32, but couldnt find any function.
in AppDelegate.cpp
bool AppDelegate::applicationDidFinishLaunching() {
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLView::createWithRect("My Game", Rect(0,0,1280,720)); // set dimension here
director->setOpenGLView(glview);
}
director->setAnimationInterval(1.0 / 60);
auto scene = GamePlayScene::createScene();
director->runWithScene(scene);
return true;
}
Or you can just do this …
pEGLView->setFrameSize(1136,640);