How can I add fullscreen to Walnut
infinitegame111 opened this issue · comments
No way of adding fullscreen appears to work for me with walnut, is there a way to do so when the app starts? If so how would I add this so my app will start fullscreened.
You can do something like this:
GLFWmonitor* monitor = glfwGetPrimaryMonitor();
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
m_WindowHandle = glfwCreateWindow(fullscreenWidth, fullscreenHeight, "Window Title", monitor, nullptr)
You of course need to call it when creating the window 👍