Add create/destroy_shader functions to RenderDriver

This commit is contained in:
2025-04-18 22:27:15 +10:00
parent 47a07ea6a8
commit c7249eeb62
4 changed files with 42 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
#include <nova/render/render_fwd.h>
#include <nova/types.h>
#include <span>
#include <string>
namespace Nova {
@@ -41,5 +42,8 @@ namespace Nova {
[[nodiscard]] virtual SwapchainID create_swapchain(SurfaceID surface) = 0;
virtual void resize_swapchain(SwapchainID swapchain) = 0;
virtual void destroy_swapchain(SwapchainID swapchain) = 0;
[[nodiscard]] virtual ShaderID create_shader(const std::span<u8> bytes) = 0;
virtual void destroy_shader(ShaderID shader) = 0;
};
} // namespace Nova

View File

@@ -12,9 +12,11 @@ namespace Nova {
class RenderDriver;
struct RenderDevice;
struct Shader;
struct Surface;
struct Swapchain;
using ShaderID = Shader*;
using SurfaceID = Surface*;
using SwapchainID = Swapchain*;
} // namespace Nova