#pragma once #include #include #include #include struct GlobalMemory; struct RenderDevice; struct Vertex { DirectX::XMFLOAT3 position; DirectX::XMFLOAT3 color; DirectX::XMFLOAT2 texCoord0; }; struct MiscData { struct CameraData { DirectX::XMMATRIX modelMatrix; DirectX::XMMATRIX viewMatrix; DirectX::XMMATRIX projectionMatrix; }; uint64_t previousCounter; VkDescriptorSetLayout descriptorSetLayout; VkPipelineLayout pipelineLayout; VkPipeline meshPipeline; VkBuffer vertexBuffer; VmaAllocation vertexBufferAllocation; size_t vertexBufferSize; std::array vertices; VkImage texture; VmaAllocation textureAllocation; VkImageView textureView; VkSampler sampler; uint64_t _padding; // TODO: Optimize out? DirectX::XMVECTOR cameraPosition; DirectX::XMVECTOR cameraTarget; DirectX::XMVECTOR cameraUp; CameraData cameraData; VkBuffer cameraUniformBuffer; VmaAllocation cameraUniformBufferAllocation; size_t cameraUniformBufferSize; uint8_t* cameraUniformBufferPtr; VkDescriptorPool descriptorPool; VkDescriptorSet descriptorSet; VkImageMemoryBarrier2 acquireToRenderBarrier; VkDependencyInfo acquireToRenderDependency; VkImageMemoryBarrier2 renderToPresentBarrier; VkDependencyInfo renderToPresentDependency; bool init( RenderDevice const& renderDevice ); void destroy( RenderDevice const& renderDevice ); };