Redefine ID types to be actual pointers

Redefined various ID types to be aliases of pointers instead of casting
a uintptr_t to the needed pointer.

e.g. SurfaceID = Surface*
This commit is contained in:
jayden committed 2025-04-16 23:46:00 +10:00
1 parent 546c485e1e
commit 4c6712e2fe
11 files changed
+77 -73

No files matched your search

+2 -6
View File
@@ -7,17 +7,13 @@
#pragma once
#include <nova/api.h>
#include <nova/platform/window_api.h>
#include <nova/platform/window_fwd.h>
#include <nova/render/render_fwd.h>
#include <nova/types.h>
#include <string_view>
namespace Nova {
using WindowID = uptr;
using SurfaceID = uptr;
class RenderDriver;
class NOVA_API WindowDriver {
public:
static WindowDriver* create();
@@ -8,4 +8,9 @@
namespace Nova {
enum class WindowAPI { WAYLAND, WINDOWS, X11 };
class WindowDriver;
struct Window;
using WindowID = Window*;
} // namespace Nova