Changeset 699e83a in opengl-game


Ignore:
Timestamp:
Jun 10, 2020, 9:18:21 PM (4 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master
Children:
f809ae6
Parents:
e1f88a9
Message:

Add a GameScreen class to render the main gameplay

Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • makefile

    re1f88a9 r699e83a  
    5959        $(CC) $(CXX_FLAGS) -o $@ $^ $(LIB_FLAGS) -DGAMEGUI_INCLUDE_VULKAN
    6060
    61 GUI_SRC_FILES = gui/screen.cpp gui/main-screen.cpp gui/ui-element.cpp gui/button.cpp
    62 GUI_HEADER_FILES = gui/screen.hpp gui/main-screen.hpp gui/ui-element.hpp gui/button.hpp
     61GUI_SRC_FILES = gui/screen.cpp gui/main-screen.cpp gui/game-screen.cpp gui/ui-element.cpp gui/button.cpp gui/panel.cpp
     62GUI_HEADER_FILES = gui/screen.hpp gui/main-screen.hpp gui/game-screen.hpp gui/ui-element.hpp gui/button.hpp gui/panel.hpp
    6363
    6464SRC_FILES = main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp utils.cpp game-gui-sdl.cpp $(GUI_SRC_FILES)
  • vulkan-game.cpp

    re1f88a9 r699e83a  
    1010
    1111#include "utils.hpp"
     12
     13#include "gui/main-screen.hpp"
     14#include "gui/game-screen.hpp"
    1215
    1316using namespace std;
     
    4649   }
    4750
     51   // TODO: Maybe make a struct of properties to share with each screen instead of passing
     52   // in all of VulkanGame
    4853   screens[SCREEN_MAIN] = new MainScreen(*renderer, *this);
     54   screens[SCREEN_GAME] = new GameScreen(*renderer, *this);
    4955
    5056   currentScreen = screens[SCREEN_MAIN];
     
    11441150
    11451151   delete screens[SCREEN_MAIN];
     1152   delete screens[SCREEN_GAME];
    11461153
    11471154   // TODO: Check if any of these functions accept null parameters
     
    16201627
    16211628      vkCmdBeginRenderPass(commandBuffers[i], &renderPassInfo, VK_SUBPASS_CONTENTS_INLINE);
    1622 
    1623       /*
    1624       modelPipeline.createRenderCommands(commandBuffers[i], i);
    1625       shipPipeline.createRenderCommands(commandBuffers[i], i);
    1626       asteroidPipeline.createRenderCommands(commandBuffers[i], i);
    1627       laserPipeline.createRenderCommands(commandBuffers[i], i);
    1628       explosionPipeline.createRenderCommands(commandBuffers[i], i);
    1629 
    1630       // Always render this pipeline last
    1631       overlayPipeline.createRenderCommands(commandBuffers[i], i);
    1632       */
    16331629
    16341630      currentScreen->createRenderCommands(commandBuffers[i], i);
  • vulkan-game.hpp

    re1f88a9 r699e83a  
    1818
    1919#include "gui/screen.hpp"
    20 #include "gui/main-screen.hpp"
    2120
    2221using namespace glm;
Note: See TracChangeset for help on using the changeset viewer.