cocos2dx 3.2 如何在windows满屏拉伸呢,不是android的苹果平台,是在windows平台下,要改那个文件??那位大神知道??
setDesignResolution()
看第二个参数可选的枚举值吧
NO_BORDER 这个用了,没用呀,在windows下窗口没有全屏化,还有标题栏和窗口界面
引擎暂时没有提供隐藏标题栏的全屏功能。
我来了解一下喽
位置:cocos2d-x-3.3\cocos2dPro\hello\cocos2d\cocos\platform\desktop\CCGLViewImpl-desktop.cpp
bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor)
{
…
_mainWindow = glfwCreateWindow(rect.size.width * _frameZoomFactor,
rect.size.height * _frameZoomFactor,
_viewName.c_str(),
glfwGetPrimaryMonitor(), //<-这里 _monitor, //
nullptr);
…
}
又不是做端游。不至于全屏吧。
glview->setFrameSize(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
glview->setDesignResolutionSize(1024, 768, ResolutionPolicy::EXACT_FIT);
createWithFullScreen
十分感谢,亲测3.6可用