First pass removing OpenGL stuff and converting to dx12

- Removed OpenGL stuff and replaced/stubbed things with dx12
- Removed .github actions stuff as we are now on gitea and wont be using
  it
This commit is contained in:
William McVicar
2024-04-05 18:29:37 +02:00
parent c837f8e027
commit bfccfbea99
24 changed files with 182 additions and 22685 deletions

12
include/CMakeLists.txt Normal file
View File

@@ -0,0 +1,12 @@
target_sources(
dx12-starter PRIVATE
device.h
window.h
)
target_include_directories(
dx12-starter PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES {SOURCES})

28
include/device.h Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#include <memory>
namespace dx12_starter
{
struct DeviceCreateParams
{
void* nativeWindowHandle;
int versionMajor;
int versionMinor;
};
class IDevice
{
public:
virtual ~IDevice() = default;
virtual void ClearBuffers() = 0;
virtual void Present() = 0;
virtual void DrawScene() = 0;
virtual void Destroy() = 0;
static std::unique_ptr<IDevice> Create(const DeviceCreateParams& params);
};
} // namespace dx12_starter

29
include/window.h Normal file
View File

@@ -0,0 +1,29 @@
#pragma once
#include <memory>
namespace dx12_starter
{
struct WindowCreateParams
{
int x;
int y;
int width;
int height;
const char* name;
};
class IWindow
{
public:
virtual ~IWindow() = default;
virtual void PumpMessages() = 0;
virtual bool IsOpen() const = 0;
virtual void* GetNativeHandle() const = 0;
static std::unique_ptr<IWindow> Create(WindowCreateParams params);
};
} // namespace starter_window