25 lines
570 B
C++
Executable file
25 lines
570 B
C++
Executable file
#pragma once
|
|
|
|
#include <d3d12.h>
|
|
#include <dxgi1_6.h>
|
|
#include <d3dcompiler.h>
|
|
#include <wrl.h>
|
|
|
|
#include "gfx.hpp"
|
|
|
|
using namespace Microsoft::WRL;
|
|
|
|
class gfx_dx12 : public GFX {
|
|
public:
|
|
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;
|
|
|
|
const char* get_name() override;
|
|
|
|
private:
|
|
void get_device();
|
|
|
|
ComPtr<ID3D12Device> device;
|
|
};
|