emu_window_sdl2_vk.h 943 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2018 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <vulkan/vulkan.h>
  6. #include "core/frontend/emu_window.h"
  7. #include "yuzu_cmd/emu_window/emu_window_sdl2.h"
  8. class EmuWindow_SDL2_VK final : public EmuWindow_SDL2 {
  9. public:
  10. explicit EmuWindow_SDL2_VK(Core::System& system, bool fullscreen);
  11. ~EmuWindow_SDL2_VK();
  12. void Present() override;
  13. void RetrieveVulkanHandlers(void* get_instance_proc_addr, void* instance,
  14. void* surface) const override;
  15. std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override;
  16. private:
  17. bool UseStandardLayers(PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr) const;
  18. VkInstance vk_instance{};
  19. VkSurfaceKHR vk_surface{};
  20. PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{};
  21. PFN_vkDestroyInstance vkDestroyInstance{};
  22. };