Hi,
Is this still an issue for cocos? I am about to commence an pc/mac project that will need to toggle window and full screen modes - e.g. Steam, etc. I know this was an issue a few years ago, but it’s fixed and doable now?
thanks
tony
Hi,
Is this still an issue for cocos? I am about to commence an pc/mac project that will need to toggle window and full screen modes - e.g. Steam, etc. I know this was an issue a few years ago, but it’s fixed and doable now?
thanks
tony
Windowed/Fullscreen toggle added on version 3.14.
If you are using version 3.13, you can copy the toggle feature in version 3.14 to your 3.13 version project since they have same version of GLFW.
If you are using older version than 3.13, you can manually upgrade GLFW to your project.
Or if you know how to program with Win32 and Cocoa, then that’s the way too by implementing by yourself.
EDIT: typo fix
Thank you - this is exactly what I want. Can you point me at the methods? I don’t see a 3.14 API ref yet…
thanks
Function is in libcocos2d/cocos/platform/desktop/CCGLViewImpl.cpp and .h
There are setFullscreen() and setWindowed(int, int).
To use this
dynamic_cast<GLViewImpl*>(cocos2d::Director::getInstance()->getOpenGLView())->[Function name here];
cool, thanks