diff --git a/engine/include/sophia/handles.hpp b/engine/include/sophia/handles.hpp index 3a97886..242535f 100644 --- a/engine/include/sophia/handles.hpp +++ b/engine/include/sophia/handles.hpp @@ -24,6 +24,15 @@ struct Handle { [[nodiscard]] auto operator<=>(const Handle&) const = default; }; +struct InvalidHandle { + template + [[nodiscard]] constexpr operator Handle() const { + return Handle::invalid(); + } +}; + +inline constexpr InvalidHandle INVALID_HANDLE{}; + class Mesh; class Panel; class RenderTarget; diff --git a/examples/boids_2d/main.cpp b/examples/boids_2d/main.cpp index 3d723fd..8dcaa57 100644 --- a/examples/boids_2d/main.cpp +++ b/examples/boids_2d/main.cpp @@ -1,6 +1,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -10,12 +13,6 @@ #include #include -#define GLM_FORCE_RADIANS -#define GLM_FORCE_DEPTH_ZERO_TO_ONE -#include -#include -#include - struct Boid { glm::vec2 position; glm::vec2 velocity;