Initial vulkan context and immediate drawer.
Extremely rough, just checking in so DrChat can snoop.
This commit is contained in:
50
src/xenia/ui/vulkan/vulkan_provider.h
Normal file
50
src/xenia/ui/vulkan/vulkan_provider.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2016 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_UI_VULKAN_VULKAN_PROVIDER_H_
|
||||
#define XENIA_UI_VULKAN_VULKAN_PROVIDER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "xenia/ui/graphics_provider.h"
|
||||
|
||||
namespace xe {
|
||||
namespace ui {
|
||||
namespace vulkan {
|
||||
|
||||
class VulkanDevice;
|
||||
class VulkanInstance;
|
||||
|
||||
class VulkanProvider : public GraphicsProvider {
|
||||
public:
|
||||
~VulkanProvider() override;
|
||||
|
||||
static std::unique_ptr<GraphicsProvider> Create(Window* main_window);
|
||||
|
||||
VulkanInstance* instance() const { return instance_.get(); }
|
||||
VulkanDevice* device() const { return device_.get(); }
|
||||
|
||||
std::unique_ptr<GraphicsContext> CreateContext(
|
||||
Window* target_window) override;
|
||||
std::unique_ptr<GraphicsContext> CreateOffscreenContext() override;
|
||||
|
||||
protected:
|
||||
explicit VulkanProvider(Window* main_window);
|
||||
|
||||
bool Initialize();
|
||||
|
||||
std::unique_ptr<VulkanInstance> instance_;
|
||||
std::unique_ptr<VulkanDevice> device_;
|
||||
};
|
||||
|
||||
} // namespace vulkan
|
||||
} // namespace ui
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_UI_VULKAN_VULKAN_PROVIDER_H_
|
||||
Reference in New Issue
Block a user