2023-04-24 12:44:07 +00:00
|
|
|
#include "ppsspp_config.h"
|
|
|
|
#if PPSSPP_PLATFORM(MAC)
|
|
|
|
#include "SDL2/SDL.h"
|
|
|
|
#include "SDL2/SDL_syswm.h"
|
|
|
|
#else
|
2018-02-04 11:26:35 +00:00
|
|
|
#include "SDL.h"
|
|
|
|
#include "SDL_syswm.h"
|
2023-04-24 12:44:07 +00:00
|
|
|
#endif
|
2018-02-04 11:26:35 +00:00
|
|
|
|
|
|
|
#include "Common/GraphicsContext.h"
|
2020-10-04 21:24:14 +00:00
|
|
|
#include "Common/GPU/Vulkan/VulkanContext.h"
|
|
|
|
#include "Common/GPU/Vulkan/VulkanDebug.h"
|
2018-02-04 11:26:35 +00:00
|
|
|
|
2020-10-04 21:24:14 +00:00
|
|
|
#include "Common/GPU/thin3d.h"
|
2018-02-04 11:26:35 +00:00
|
|
|
|
2020-06-21 22:54:51 +00:00
|
|
|
class VulkanRenderManager;
|
|
|
|
|
2018-02-04 11:26:35 +00:00
|
|
|
class SDLVulkanGraphicsContext : public GraphicsContext {
|
|
|
|
public:
|
|
|
|
SDLVulkanGraphicsContext() {}
|
|
|
|
~SDLVulkanGraphicsContext() {
|
|
|
|
delete draw_;
|
|
|
|
}
|
|
|
|
|
2023-03-28 12:51:18 +00:00
|
|
|
bool Init(SDL_Window *&window, int x, int y, int w, int h, int mode, std::string *error_message);
|
2018-02-04 11:26:35 +00:00
|
|
|
|
|
|
|
void Shutdown() override;
|
|
|
|
|
2020-06-21 22:54:51 +00:00
|
|
|
void Resize() override;
|
|
|
|
|
|
|
|
void Poll() override;
|
2018-02-04 11:26:35 +00:00
|
|
|
|
|
|
|
void *GetAPIContext() override {
|
|
|
|
return vulkan_;
|
|
|
|
}
|
|
|
|
|
|
|
|
Draw::DrawContext *GetDrawContext() override {
|
|
|
|
return draw_;
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
Draw::DrawContext *draw_ = nullptr;
|
|
|
|
VulkanContext *vulkan_ = nullptr;
|
2020-06-21 22:54:51 +00:00
|
|
|
VulkanRenderManager *renderManager_ = nullptr;
|
2018-02-04 11:26:35 +00:00
|
|
|
};
|