Files
dx12-starter/include/renderer.h
William McVicar 90f8185cbc Following along with the example for the simple
triangle in the DirectX-Graphics-Samples repository
it can render a simple triangle
2024-04-10 23:08:59 +02:00

34 lines
539 B
C++

#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