CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/SDL/SDLVulkanGraphicsContext.h
Views: 1401
1
#include "ppsspp_config.h"
2
#if PPSSPP_PLATFORM(MAC)
3
#include "SDL2/SDL.h"
4
#include "SDL2/SDL_syswm.h"
5
#else
6
#include "SDL.h"
7
#include "SDL_syswm.h"
8
#endif
9
10
#include "Common/GraphicsContext.h"
11
#include "Common/GPU/Vulkan/VulkanContext.h"
12
#include "Common/GPU/Vulkan/VulkanDebug.h"
13
14
#include "Common/GPU/thin3d.h"
15
16
class VulkanRenderManager;
17
18
class SDLVulkanGraphicsContext : public GraphicsContext {
19
public:
20
SDLVulkanGraphicsContext() {}
21
~SDLVulkanGraphicsContext() {
22
delete draw_;
23
}
24
25
bool Init(SDL_Window *&window, int x, int y, int w, int h, int mode, std::string *error_message);
26
27
void Shutdown() override;
28
29
void Resize() override;
30
31
void Poll() override;
32
33
void *GetAPIContext() override {
34
return vulkan_;
35
}
36
37
Draw::DrawContext *GetDrawContext() override {
38
return draw_;
39
}
40
private:
41
Draw::DrawContext *draw_ = nullptr;
42
VulkanContext *vulkan_ = nullptr;
43
VulkanRenderManager *renderManager_ = nullptr;
44
};
45
46