Changeset 5edbd58 in opengl-game for vulkan-game.cpp


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

For both openglgame and vulkangame, pass in the window width and height and a fullscreen flag to the run() function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r2beb6c7 r5edbd58  
    22
    33#include <iostream>
     4
     5#include "consts.hpp"
    46
    57#define GAMEGUI_INCLUDE_VULKAN
     
    1618}
    1719
    18 void VulkanGame::run() {
    19    if (initWindow() == RTWO_ERROR) {
     20void VulkanGame::run(unsigned int width, unsigned int height, unsigned char guiFlags) {
     21   if (initWindow(width, height, guiFlags) == RTWO_ERROR) {
    2022      return;
    2123   }
     
    2527}
    2628
    27 bool VulkanGame::initWindow() {
     29bool VulkanGame::initWindow(unsigned int width, unsigned int height, unsigned char guiFlags) {
    2830   gui = new GameGui_SDL();
    2931
     
    3537   cout << "GUI init succeeded" << endl;
    3638
    37    window = (SDL_Window*) gui->CreateWindow("Vulkan Game", SCREEN_WIDTH, SCREEN_HEIGHT);
     39   window = (SDL_Window*) gui->CreateWindow("Vulkan Game", width, height);
    3840   if (window == nullptr) {
    3941      cout << "Window could not be created!" << endl;
Note: See TracChangeset for help on using the changeset viewer.