Moved RenderDriver/WindorDriver init code to static create functions
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2025, Jayden Grubb <contact@jaydengrubb.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <nova/api.h>
|
||||
#include <nova/platform/window_driver.h>
|
||||
|
||||
namespace Nova {
|
||||
class NOVA_API System {
|
||||
public:
|
||||
static void init();
|
||||
static void shutdown();
|
||||
static WindowDriver* get_driver();
|
||||
};
|
||||
} // namespace Nova
|
||||
@@ -7,7 +7,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <nova/api.h>
|
||||
#include <nova/render/render_driver.h>
|
||||
#include <nova/types.h>
|
||||
|
||||
#include <string_view>
|
||||
@@ -17,6 +16,7 @@ namespace Nova {
|
||||
|
||||
class NOVA_API WindowDriver {
|
||||
public:
|
||||
static WindowDriver* create();
|
||||
virtual ~WindowDriver() = default;
|
||||
|
||||
virtual void poll_events() = 0;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <nova/api.h>
|
||||
#include <nova/platform/window_driver.h>
|
||||
#include <nova/render/render_api.h>
|
||||
#include <nova/render/render_device.h>
|
||||
#include <nova/types.h>
|
||||
@@ -16,6 +17,7 @@
|
||||
namespace Nova {
|
||||
class NOVA_API RenderDriver {
|
||||
public:
|
||||
static RenderDriver* create(RenderAPI api, WindowDriver* window_driver = nullptr);
|
||||
virtual ~RenderDriver() = default;
|
||||
|
||||
[[nodiscard]] virtual RenderAPI get_api() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user