Changeset 40995d3 in opengl-game
- Timestamp:
- Oct 1, 2019, 3:14:06 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 4d84c72
- Parents:
- 7563b8a (diff), a0da009 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-glfw.cpp
r7563b8a r40995d3 66 66 glfwSetMouseButtonCallback(window, glfw_mouse_button_callback); 67 67 glfwSetKeyCallback(window, glfw_key_callback); 68 glfwSetWindowSizeCallback(window, glfw_window_size_callback); 68 69 } 69 70 … … 151 152 GameGui_GLFW::s_events.push(e); 152 153 } 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
r7563b8a r40995d3 50 50 void glfw_mouse_button_callback(GLFWwindow* window, int button, int action, int mods); 51 51 void 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); 52 53 53 54 #endif // _GAME_GUI_GLFW_H -
game-gui-sdl.cpp
r7563b8a r40995d3 122 122 case SDL_AUDIODEVICEREMOVED: 123 123 case SDL_TEXTEDITING: // TODO: Research this one later 124 event = nullptr;125 return 0;124 event->type = UI_EVENT_UNKNOWN; 125 event->unknown.eventType = e.type; 126 126 break; 127 127 default: 128 cout << "Unknown event type: 0x" << hex << e.type << dec << endl; 129 event = nullptr; 130 return 0; 128 event->type = UI_EVENT_UNKNOWN; 129 event->unknown.eventType = 0; 131 130 } 132 131 -
game-gui.hpp
r7563b8a r40995d3 4 4 #include <string> 5 5 #include <vector> 6 7 // TODO: Remove the line below once the couts in the game-gui-* files are moved8 #include <iostream>9 6 10 7 #ifdef GAMEGUI_INCLUDE_VULKAN … … 21 18 UI_EVENT_MOUSEBUTTONDOWN, 22 19 UI_EVENT_MOUSEBUTTONUP, 23 UI_EVENT_MOUSEMOTION 20 UI_EVENT_MOUSEMOTION, 21 UI_EVENT_UNKNOWN 24 22 }; 25 23 … … 35 33 struct MouseEvent { 36 34 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; 37 46 }; 38 47 … … 42 51 KeyEvent key; 43 52 MouseEvent mouse; 53 UnknownEvent unknown; 44 54 }; 45 46 /*47 struct MouseEvent {48 int button;49 int action;50 int x;51 int y;52 };53 */54 55 55 56 class GameGui { -
opengl-game.cpp
r7563b8a r40995d3 125 125 } 126 126 break; 127 case UI_EVENT_WINDOWRESIZE: 128 cout << "Window resize event detected" << endl; 129 break; 127 130 default: 128 131 cout << "Unhandled UI event: " << e.type << endl; -
vulkan-game.cpp
r7563b8a r40995d3 144 144 break; 145 145 case UI_EVENT_MOUSEMOTION: 146 break; 147 case UI_EVENT_UNKNOWN: 148 cout << "Unknown event type: 0x" << hex << e.unknown.eventType << dec << endl; 146 149 break; 147 150 default: -
vulkan-ref.cpp
r7563b8a r40995d3 330 330 /*** END OF REFACTORED CODE ***/ 331 331 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 332 335 createImageResources("textures/texture.jpg", textureImage, textureImageMemory, textureImageView); 333 336 createImageResourcesFromSDLTexture(uiOverlay, sdlOverlayImage, sdlOverlayImageMemory, sdlOverlayImageView); … … 343 346 overlayImageInfo.imageView = sdlOverlayImageView; 344 347 overlayImageInfo.sampler = textureSampler; 348 349 // SHADER-SPECIFIC STUFF STARTS HERE 345 350 346 351 vector<Vertex> sceneVertices = {
Note:
See TracChangeset
for help on using the changeset viewer.