Changes in / [40995d3:7563b8a] in opengl-game


Ignore:
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • game-gui-glfw.cpp

    r40995d3 r7563b8a  
    6666   glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);
    6767   glfwSetKeyCallback(window, glfw_key_callback);
    68    glfwSetWindowSizeCallback(window, glfw_window_size_callback);
    6968}
    7069
     
    152151   GameGui_GLFW::s_events.push(e);
    153152}
    154 
    155 void glfw_window_size_callback(GLFWwindow* window, int width, int height) {
    156    UIEvent e;
    157    e.type = UI_EVENT_WINDOWRESIZE;
    158 
    159    GameGui_GLFW::s_events.push(e);
    160 }
  • game-gui-glfw.hpp

    r40995d3 r7563b8a  
    5050void glfw_mouse_button_callback(GLFWwindow* window, int button, int action, int mods);
    5151void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
    52 void glfw_window_size_callback(GLFWwindow* window, int width, int height);
    5352
    5453#endif // _GAME_GUI_GLFW_H
  • game-gui-sdl.cpp

    r40995d3 r7563b8a  
    122122         case SDL_AUDIODEVICEREMOVED:
    123123         case SDL_TEXTEDITING: // TODO: Research this one later
    124             event->type = UI_EVENT_UNKNOWN;
    125             event->unknown.eventType = e.type;
     124            event = nullptr;
     125            return 0;
    126126            break;
    127127         default:
    128             event->type = UI_EVENT_UNKNOWN;
    129             event->unknown.eventType = 0;
     128            cout << "Unknown event type: 0x" << hex << e.type << dec << endl;
     129            event = nullptr;
     130            return 0;
    130131      }
    131132
  • game-gui.hpp

    r40995d3 r7563b8a  
    44#include <string>
    55#include <vector>
     6
     7// TODO: Remove the line below once the couts in the game-gui-* files are moved
     8#include <iostream>
    69
    710#ifdef GAMEGUI_INCLUDE_VULKAN
     
    1821   UI_EVENT_MOUSEBUTTONDOWN,
    1922   UI_EVENT_MOUSEBUTTONUP,
    20    UI_EVENT_MOUSEMOTION,
    21    UI_EVENT_UNKNOWN
     23   UI_EVENT_MOUSEMOTION
    2224};
    2325
     
    3335struct MouseEvent {
    3436   EventType type;
    35    /*
    36       int button;
    37       int action;
    38       int x;
    39       int y;
    40    */
    41 };
    42 
    43 struct UnknownEvent {
    44    EventType type;
    45    unsigned int eventType;
    4637};
    4738
     
    5142   KeyEvent key;
    5243   MouseEvent mouse;
    53    UnknownEvent unknown;
    5444};
     45
     46/*
     47struct MouseEvent {
     48   int button;
     49   int action;
     50   int x;
     51   int y;
     52};
     53*/
    5554
    5655class GameGui {
  • opengl-game.cpp

    r40995d3 r7563b8a  
    125125               }
    126126               break;
    127             case UI_EVENT_WINDOWRESIZE:
    128                cout << "Window resize event detected" << endl;
    129                break;
    130127            default:
    131128               cout << "Unhandled UI event: " << e.type << endl;
  • vulkan-game.cpp

    r40995d3 r7563b8a  
    144144               break;
    145145            case UI_EVENT_MOUSEMOTION:
    146                break;
    147             case UI_EVENT_UNKNOWN:
    148                cout << "Unknown event type: 0x" << hex << e.unknown.eventType << dec << endl;
    149146               break;
    150147            default:
  • vulkan-ref.cpp

    r40995d3 r7563b8a  
    330330/*** END OF REFACTORED CODE ***/
    331331
    332          // THIS SECTION IS WHERE TEXTURES ARE CREATED, MAYBE SPLIT IT OFF INTO A SEPARATE FUNCTION
    333          // MAY WANT TO CREATE A STRUCT TO HOLD SIMILAR VARIABLES< LIKE THOSE FOR A TEXTURE
    334 
    335332         createImageResources("textures/texture.jpg", textureImage, textureImageMemory, textureImageView);
    336333         createImageResourcesFromSDLTexture(uiOverlay, sdlOverlayImage, sdlOverlayImageMemory, sdlOverlayImageView);
     
    346343         overlayImageInfo.imageView = sdlOverlayImageView;
    347344         overlayImageInfo.sampler = textureSampler;
    348 
    349          // SHADER-SPECIFIC STUFF STARTS HERE
    350345
    351346         vector<Vertex> sceneVertices = {
Note: See TracChangeset for help on using the changeset viewer.