Following along with the example for the simple

triangle in the DirectX-Graphics-Samples repository
it can render a simple triangle
This commit is contained in:
William McVicar
2024-04-10 23:08:59 +02:00
parent bfccfbea99
commit 90f8185cbc
15 changed files with 4937 additions and 82 deletions

33
include/renderer.h Normal file
View File

@@ -0,0 +1,33 @@
#pragma once
#include <memory>
namespace dx12_starter
{
struct APIVersion
{
uint32_t major;
uint32_t minor;
};
struct RendererCreateParams
{
void* nativeWindowHandle;
APIVersion minimumVersion;
uint32_t frameCount;
};
class IRenderer
{
public:
virtual ~IRenderer() = default;
virtual void RecordCommands() = 0;
virtual void Render() = 0;
virtual void WaitForPreviousFrame() = 0;
virtual void Destroy() = 0;
static std::unique_ptr<IRenderer> Create(const RendererCreateParams& params);
};
} // namespace dx12_starter