diff --git a/Source/Engine/Core/Collections/Array.h b/Source/Engine/Core/Collections/Array.h index ec2d28f49..4b9511671 100644 --- a/Source/Engine/Core/Collections/Array.h +++ b/Source/Engine/Core/Collections/Array.h @@ -125,8 +125,8 @@ public: /// Initializes a new instance of the class. /// /// The other collection to copy. - template - explicit Array(const Array& other) noexcept + template + explicit Array(const Array& other) noexcept { _capacity = other.Capacity(); _count = other.Count(); @@ -512,8 +512,8 @@ public: /// Adds the other collection to the collection. /// /// The other collection to add. - template - FORCE_INLINE void Add(const Array& other) + template + FORCE_INLINE void Add(const Array& other) { Add(other.Get(), other.Count()); } @@ -629,8 +629,8 @@ public: /// /// The item to check. /// True if item has been found in the collection, otherwise false. - template - bool Contains(const TComparableType& item) const + template + bool Contains(const Other& item) const { const T* data = _allocation.Get(); for (int32 i = 0; i < _count; i++) @@ -914,8 +914,8 @@ public: } public: - template - bool operator==(const Array& other) const + template + bool operator==(const Array& other) const { if (_count == other.Count()) { @@ -931,8 +931,8 @@ public: return false; } - template - bool operator!=(const Array& other) const + template + bool operator!=(const Array& other) const { return !operator==(other); } diff --git a/Source/Engine/Graphics/GPUBufferDescription.h b/Source/Engine/Graphics/GPUBufferDescription.h index 73f459da2..adb7f3cf2 100644 --- a/Source/Engine/Graphics/GPUBufferDescription.h +++ b/Source/Engine/Graphics/GPUBufferDescription.h @@ -281,7 +281,6 @@ public: auto bufferFlags = GPUBufferFlags::Structured | GPUBufferFlags::ShaderResource; if (isUnorderedAccess) bufferFlags |= GPUBufferFlags::UnorderedAccess; - return Buffer(elementCount * elementSize, bufferFlags, PixelFormat::Unknown, nullptr, elementSize); } diff --git a/Source/Engine/Graphics/Models/MeshDeformation.cpp b/Source/Engine/Graphics/Models/MeshDeformation.cpp index 5db0db6a0..2183fd7ea 100644 --- a/Source/Engine/Graphics/Models/MeshDeformation.cpp +++ b/Source/Engine/Graphics/Models/MeshDeformation.cpp @@ -127,7 +127,7 @@ void MeshDeformation::RunDeformers(const MeshBase* mesh, MeshBufferType type, GP } if (!deformation) { - deformation = New(key, type, vertexStride); + deformation = New(key, type, vertexStride, vertexBuffer->GetVertexLayout()); deformation->VertexBuffer.Data.Resize(vertexBuffer->GetSize()); deformation->Bounds = mesh->GetBox(); _deformations.Add(deformation); diff --git a/Source/Engine/Graphics/Models/MeshDeformation.h b/Source/Engine/Graphics/Models/MeshDeformation.h index 15dae488b..dbc7db87c 100644 --- a/Source/Engine/Graphics/Models/MeshDeformation.h +++ b/Source/Engine/Graphics/Models/MeshDeformation.h @@ -20,10 +20,10 @@ struct MeshDeformationData BoundingBox Bounds; DynamicVertexBuffer VertexBuffer; - MeshDeformationData(uint64 key, MeshBufferType type, uint32 stride) + MeshDeformationData(uint64 key, MeshBufferType type, uint32 stride, GPUVertexLayout* layout) : Key(key) , Type(type) - , VertexBuffer(0, stride, TEXT("MeshDeformation")) + , VertexBuffer(0, stride, TEXT("MeshDeformation"), layout) { }