cocos2dx在win32中全屏

前端之家收集整理的这篇文章主要介绍了cocos2dx在win32中全屏前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
bool AppDelegate::applicationDidFinishLaunching() {
    // initialize director
    auto director = Director::getInstance();
    auto glview = director->getOpenGLView();
    if(!glview) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
        //glview = GLViewImpl::createWithRect("Test",Rect(0,customResolutionSize.width,customResolutionSize.height));
		glview=GLViewImpl::createWithFullScreen("Test");
#else
        glview = GLViewImpl::create("Test");
#endif
        director->setOpenGLView(glview);
    }
在AppDelegate.cpp中,glview就是创建弹出框的大小view,以前我看了很多底层代码,都买找到,难受死了,现在终于找到了。

猜你在找的Cocos2d-x相关文章