Changeset 6493e43 in opengl-game for sdl-game.hpp


Ignore:
Timestamp:
Jan 3, 2021, 6:18:28 PM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
6a39266
Parents:
3b7d497
Message:

In sdl-game, add support for using separate graphics and present queues, and move the example ImGui code for (re)creating the swapchain into my own files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sdl-game.hpp

    r3b7d497 r6493e43  
    77
    88#include <SDL2/SDL.h>
     9
     10#include "IMGUI/imgui_impl_vulkan.h"
    911
    1012#include "consts.hpp"
     
    4951      VkDebugUtilsMessengerEXT debugMessenger = VK_NULL_HANDLE;
    5052      VkSurfaceKHR surface; // TODO: Change the variable name to vulkanSurface
     53
     54      VkQueue graphicsQueue;
     55      VkQueue presentQueue;
    5156     
    5257      // My code, but not complete. Skips creating the SDL renderer, probably because it doesn't use hardware acceleration.
     
    6469      void createLogicalDevice(const vector<const char*>& validationLayers,
    6570         const vector<const char*>& deviceExtensions); // Only creates the graphics queue. Later, checks that this queue also supports presenting, but this codebase does not seem to support a separate present queue
     71
     72      // Pipeline variables. Hopefully, I can eventually use the GraphicsPipeline_Vulkan class for the imgui pipeline
     73      VkDescriptorPool descriptorPool;
     74
    6675};
    6776
     77// These functions are helper functions that were used in the ImGui Vulkan+SDL example
     78
     79void ImGui_ImplVulkanH_CreateOrResizeWindow(VkInstance instance, VkPhysicalDevice physical_device, VkDevice device,
     80   ImGui_ImplVulkanH_Window* wnd, uint32_t queue_family, const VkAllocationCallbacks* allocator, int w, int h,
     81   uint32_t min_image_count);
     82
     83void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, VkDevice device,
     84   ImGui_ImplVulkanH_Window* wd, const VkAllocationCallbacks* allocator, int w, int h, uint32_t min_image_count);
     85
     86// End helper functions
     87
    6888#endif // _SDL_GAME_H
Note: See TracChangeset for help on using the changeset viewer.