generated from McMassiveNZ/opengl-starter
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:
33
include/renderer.h
Normal file
33
include/renderer.h
Normal 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
|
||||
Reference in New Issue
Block a user