2015-10-10 16:41:19 +02:00
|
|
|
// Copyright (c) 2015- PPSSPP Project.
|
|
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Common/GraphicsContext.h"
|
|
|
|
|
#include "Windows/GPU/WindowsGraphicsContext.h"
|
2020-10-04 23:24:14 +02:00
|
|
|
#include "Common/GPU/thin3d.h"
|
2015-10-10 16:41:19 +02:00
|
|
|
|
2020-07-18 22:50:26 +02:00
|
|
|
class VulkanContext;
|
2020-06-21 22:34:37 +02:00
|
|
|
class VulkanRenderManager;
|
|
|
|
|
|
2015-10-10 16:41:19 +02:00
|
|
|
class WindowsVulkanContext : public WindowsGraphicsContext {
|
|
|
|
|
public:
|
2017-02-06 11:20:27 +01:00
|
|
|
WindowsVulkanContext() : draw_(nullptr) {}
|
2015-10-10 16:41:19 +02:00
|
|
|
bool Init(HINSTANCE hInst, HWND window, std::string *error_message) override;
|
|
|
|
|
void Shutdown() override;
|
|
|
|
|
void Resize() override;
|
2020-06-21 22:34:37 +02:00
|
|
|
void Poll() override;
|
2015-10-10 16:41:19 +02:00
|
|
|
|
2021-02-14 09:53:05 -08:00
|
|
|
void *GetAPIContext() override;
|
2016-01-05 21:18:43 +01:00
|
|
|
|
2017-02-06 11:20:27 +01:00
|
|
|
Draw::DrawContext *GetDrawContext() override { return draw_; }
|
|
|
|
|
private:
|
|
|
|
|
Draw::DrawContext *draw_;
|
2020-07-18 22:50:26 +02:00
|
|
|
VulkanContext *vulkan_ = nullptr;
|
2020-06-21 22:34:37 +02:00
|
|
|
VulkanRenderManager *renderManager_ = nullptr;
|
2015-10-10 16:41:19 +02:00
|
|
|
};
|
|
|
|
|
|