summaryrefslogtreecommitdiff
path: root/src/components.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.hpp')
-rw-r--r--src/components.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/components.hpp b/src/components.hpp
new file mode 100644
index 0000000..4c40927
--- /dev/null
+++ b/src/components.hpp
@@ -0,0 +1,38 @@
+#ifndef PKE_COMPONENTS_HPP
+#define PKE_COMPONENTS_HPP
+
+#include"macros.hpp"
+#include <vulkan/vulkan_core.h>
+
+const uint64_t ECS_UNSET_VAL = 0xFFFFFFFFFFFFFFFF;
+
+TypeSafeInt_H(EntityHandle, uint64_t, UINT64_MAX);
+TypeSafeInt_H(GrBindsHandle, uint64_t, UINT64_MAX);
+
+struct Entity {
+ EntityHandle handle = EntityHandle{EntityHandle_T{ECS_UNSET_VAL}};
+ EntityHandle parentHandle = EntityHandle{EntityHandle_T{ECS_UNSET_VAL}};
+ bool isMarkedForRemoval = false;
+ GrBindsHandle grBindsHandle = GrBindsHandle{GrBindsHandle_T{ECS_UNSET_VAL}};
+};
+
+struct CompGrBinds {
+ EntityHandle entityHandle = EntityHandle{EntityHandle_T{ECS_UNSET_VAL}};
+ GrBindsHandle grBindsHandle = GrBindsHandle{GrBindsHandle_T{ECS_UNSET_VAL}};
+ VkBuffer vertexBuffer = VK_NULL_HANDLE;
+ uint32_t vertexFirstBinding = 0;
+ uint32_t vertexCount = 0;
+ VkDeviceSize vertexOffsets = 0;
+ VkBuffer indexBuffer = VK_NULL_HANDLE;
+ uint32_t indexFirstBinding = 0;
+ uint32_t indexCount = 0;
+ VkDeviceSize indexOffsets = 0;
+ VkBuffer instanceBuffer = VK_NULL_HANDLE;
+ uint32_t instanceFirstBinding = 0;
+ uint32_t instanceCount = 0;
+ VkDeviceSize instanceOffsets = 0;
+ VkPipelineLayout vkPipelineLayout = VK_NULL_HANDLE;
+ VkDescriptorSet vkDescriptorSet = VK_NULL_HANDLE;
+};
+
+#endif /* PKE_COMPONENTS_HPP */