I can't get fullscreen to work while pressing F11 like other game in glfw. Here's the code:
#include <iostream>
#include <GLFW/glfw3.h>
void key_input(GLFWwindow* window, int key, int scancode, int action, int mods)
{
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
if (key == GLFW_KEY_F11 && action == GLFW_PRESS)
if (!glfwGetPrimaryMonitor())
glfwGetPrimaryMonitor();
if (glfwGetPrimaryMonitor())
!glfwGetPrimaryMonitor();
}