Changeset 5edbd58 in opengl-game for opengl-game.cpp
- Timestamp:
- Sep 2, 2019, 5:23:40 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 301d0d4
- Parents:
- 2beb6c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
opengl-game.cpp
r2beb6c7 r5edbd58 2 2 3 3 #include <iostream> 4 5 #include "consts.hpp" 4 6 5 7 #include "game-gui-glfw.hpp" … … 15 17 } 16 18 17 void OpenGLGame::run( ) {18 if (initWindow( ) == RTWO_ERROR) {19 void OpenGLGame::run(unsigned int width, unsigned int height, unsigned char guiFlags) { 20 if (initWindow(width, height, guiFlags) == RTWO_ERROR) { 19 21 return; 20 22 } … … 24 26 } 25 27 26 bool OpenGLGame::initWindow( ) {28 bool OpenGLGame::initWindow(unsigned int width, unsigned int height, unsigned char guiFlags) { 27 29 gui = new GameGui_GLFW(); 28 30 … … 34 36 cout << "GUI init succeeded" << endl; 35 37 36 window = (GLFWwindow*) gui->CreateWindow("OpenGL Game", SCREEN_WIDTH, SCREEN_HEIGHT);38 window = (GLFWwindow*) gui->CreateWindow("OpenGL Game", width, height); 37 39 if (window == nullptr) { 38 40 cout << "Window could not be created!" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.