5 #include <ThirdParty/Vulkan/Include/vulkan/vulkan.h> 15 #include <ThirdParty/glm/glm/glm.hpp> 21 class VulkanSkeletalMeshRenderer
24 VulkanSkeletalMeshRenderer(VulkanRenderer* renderer, VulkanLogicalDevice* device, VulkanDescriptorPool* descriptorPool);
25 ~VulkanSkeletalMeshRenderer();
27 void StartRender(glm::mat4 view, glm::mat4 projection);
29 void RenderMesh(
const glm::mat4x4& modelMatrix, VulkanMesh* mesh,
30 VulkanMaterial* material, Skeleton* skeleton,
32 float time,
float ticksPerSecond,
float duration,
bool looping,
33 const glm::vec4& mainColor = glm::vec4(1.f, 1.f, 1.f, 1.f));
35 void FinishRender(
size_t threadID, VkCommandPool commandPool, VkCommandBuffer buffer);
37 void RenderShadows(
size_t threadID, VkCommandPool commandPool, VkCommandBuffer buffer, uint32_t lightOffset);
42 const int MAX_INSTANCE_COUNT = 256;
46 eastl::unique_ptr<VulkanPipeline> skeletalMeshPipeline_;
47 eastl::unique_ptr<VulkanPipeline> shadowPipeline_;
49 eastl::unique_ptr<VulkanBuffer> uniformBuffer_;
58 eastl::weak_ptr<VulkanTexture> defaultTexture_;
60 VkDescriptorSet oldBones_;
62 eastl::vector<VkDescriptorSet> uboDescriptors_;
75 VulkanMaterial* material;
77 VulkanTexture* boneData;
87 eastl::vector<MeshData> meshes;
89 VulkanRenderer* renderer_;
90 VulkanLogicalDevice* device_;
91 VulkanDescriptorPool* descriptorPool_;
92 VkCommandPool commandPool_;
93 VmaAllocator allocator_;
95 VkCommandBuffer commandBuffer_;
100 #endif // USING_VULKAN