Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/engine/gfx/dx12/include/gfx_dx12.hpp

26 lines
570 B
C++
Raw Normal View History

2022-02-21 15:40:27 -05:00
#pragma once
2022-02-21 16:32:05 -05:00
#include <d3d12.h>
#include <dxgi1_6.h>
#include <d3dcompiler.h>
#include <wrl.h>
2022-02-21 15:40:27 -05:00
#include "gfx.hpp"
2022-02-21 16:32:05 -05:00
using namespace Microsoft::WRL;
2022-02-21 15:40:27 -05:00
class gfx_dx12 : public GFX {
public:
2022-02-21 15:53:42 -05:00
bool is_supported() override { return true; }
ShaderLanguage accepted_shader_language() override { return ShaderLanguage::HLSL; }
GFXContext required_context() override { return GFXContext::DirectX; }
bool initialize(const GFXCreateInfo& info) override;
2022-02-21 15:40:27 -05:00
2022-02-21 15:53:42 -05:00
const char* get_name() override;
2022-02-21 16:32:05 -05:00
private:
void get_device();
ComPtr<ID3D12Device> device;
2022-02-21 15:40:27 -05:00
};