Repository navigation
Onyx 0.3.1
➕ New features
-
Entity Component System (ECS) Improvements
- Refactored and polished ECS with cleaner dependency injection patterns.
- Supported objects that can be used for the dependency injection are the following
- EntityQuery<Ts...> for accessing filtered entities.
- Non-entity parameters like GameTime, FrameContext and more.
Systems are now plain C++ functions, with their dependencies injected via function parameters.
using EntityQuery = Entity::EntityQuery<DirectionalLightComponent, const TransformComponent>; void system(EntityQuery entities, Graphics::FrameContext& frameContext, GameCore::GameTime& time) { auto view = entities.GetView(); for (Entity::EntityId id : view) { const auto& transform = view.get<TransformComponent>(id); // read-only auto& light = view.get<DirectionalLightComponent>(id); // writable // Use both to populate lighting data... } }
-
Added GameTime struct
- Introduced zero abstraction for delta time in update functions so it can be easily detected for dependency injection
🛠 Fixes
-
Clang Compatibility
Adjusted usage of [[nodiscard]] to be compliant with Clang:
Moved annotations to the front of constexpr and consteval functions.
Ensured all relevant hash-related functions are properly marked. -
TypeID & Asset Selector Fixes
- Corrected MaterialComponent and other asset-related systems to use the correct typeid.
- Fixed incorrect CreateComponent logic and GetAvailableAssets queries in the entity registry.
-
Samplers & Bindings
- Fixed missing binding names for buffers in release builds.
- Corrected hash calculation for samplers.
📄 Miscellaneous
README
- Added a build badge for build status visibility.
- Added a discord badge for community visibility.