Changeset 27c40ce in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Sep 12, 2019, 3:29:50 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
7bf5433
Parents:
39278a8
Message:

Update vulkangame to correctly display a window in Windows and add some commented-out code for a generic system for processing UI events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r39278a8 r27c40ce  
    44
    55#include "consts.hpp"
    6 
    7 #define GAMEGUI_INCLUDE_VULKAN
    8 #include "game-gui-sdl.hpp"
    96
    107using namespace std;
     
    2219      return;
    2320   }
     21
     22   SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, 0);
     23   SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
     24
     25   SDL_RenderClear(renderer);
     26
     27   SDL_RenderPresent(renderer);
    2428
    2529   initVulkan();
     
    5862void VulkanGame::mainLoop() {
    5963   SDL_Event e;
     64   //MouseEvent mouseEvent;
    6065   bool quit = false;
    6166
    6267   while (!quit) {
     68      /*
     69      gui->processEvents();
     70
     71      if (gui->getKeyEvent(SDLK_ESCAPE) == RTWO_KEY_EVENT_PRESSED) {
     72         quit = true;
     73      }
     74
     75      while (gui->pollMouseEvent(&mouseEvent)) {
     76         cout << "Mouse click detected at (" << mouseEvent.x << ", " << mouseEvent.y << ")" << endl;
     77      }
     78      */
     79
    6380      while (SDL_PollEvent(&e)) {
    6481         if (e.type == SDL_QUIT) {
Note: See TracChangeset for help on using the changeset viewer.