diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c index aa042b0..c99bf1c 100644 --- a/src/main.c +++ b/src/main.c @@ -3,8 +3,6 @@ #include <stdio.h> #include <stdlib.h> -#define GL_SILENCE_DEPRECATION 1 - int main() { // Initialize GLFW if (!glfwInit()) { @@ -17,7 +15,10 @@ int main() { glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // Create a windowed mode window and its OpenGL context - GLFWwindow *window = glfwCreateWindow(320, 240, "Blue screen", NULL, NULL); + GLFWmonitor *glfwMonitor = glfwGetPrimaryMonitor(); + const GLFWvidmode *mode = glfwGetVideoMode(glfwMonitor); + GLFWwindow *window = glfwCreateWindow(mode->width, mode->height, + "Blue screen", glfwMonitor, NULL); if (!window) { glfwTerminate(); return -1; @@ -32,11 +33,7 @@ int main() { return -1; } - float vertices[] = { - -0.5f, -0.5f, 0.0f, - 0.5f, -0.5f, 0.0f, - 0.0f, 0.5f, 0.0f - }; + float vertices[] = {-0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f}; unsigned int VBO; glGenBuffers(1, &VBO); |