More foundation for more reflection.
This commit is contained in:
@@ -13,6 +13,8 @@ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||
|
||||
namespace iwa
|
||||
{
|
||||
IWA_REGISTER_CLASS(Instance)
|
||||
|
||||
namespace
|
||||
{
|
||||
void buildDefaultInstanceExtensionList(std::vector<ExtensionInfo>& outExtensions) noexcept
|
||||
|
||||
18
source/type_meta.cpp
Normal file
18
source/type_meta.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "iwa/type_meta.hpp"
|
||||
|
||||
namespace iwa
|
||||
{
|
||||
namespace
|
||||
{
|
||||
std::vector<const Class*> gClassRegistry;
|
||||
}
|
||||
void registerClass(const Class* clazz) noexcept
|
||||
{
|
||||
gClassRegistry.push_back(clazz);
|
||||
}
|
||||
|
||||
std::span<const Class*> getRegisteredClasses() noexcept
|
||||
{
|
||||
return gClassRegistry;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ namespace iwa
|
||||
{
|
||||
inline constexpr const char* WINDOW_DATA_NAME = "iwa_window";
|
||||
|
||||
IWA_REGISTER_CLASS(Window)
|
||||
|
||||
namespace
|
||||
{
|
||||
Window* gLastEventWindow = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user