Changeset 1ce9afe in opengl-game for opengl-game.cpp


Ignore:
Timestamp:
Sep 2, 2019, 7:40:49 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
7fc5e27
Parents:
301d0d4
Message:

Add a fullscreen flag to GameGui::CreateWindow and implement fullscreen functionality and the ability to detect key presses in openglgame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • opengl-game.cpp

    r301d0d4 r1ce9afe  
    3636   cout << "GUI init succeeded" << endl;
    3737
    38    window = (GLFWwindow*) gui->CreateWindow("OpenGL Game", width, height);
     38   window = (GLFWwindow*) gui->CreateWindow("OpenGL Game", width, height, guiFlags | GUI_FLAGS_WINDOW_FULLSCREEN);
    3939   if (window == nullptr) {
    4040      cout << "Window could not be created!" << endl;
     
    5252      glfwPollEvents();
    5353
     54      if (GameGui_GLFW::s_keyState[GLFW_KEY_ESCAPE] == GLFW_PRESS) {
     55         glfwSetWindowShouldClose(window, 1);
     56      }
     57
    5458      glfwSwapBuffers(window);
    5559   }
Note: See TracChangeset for help on using the changeset viewer.