Add stride to GPUVertexLayout
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "GPUBufferDescription.h"
|
||||
#include "PixelFormatExtensions.h"
|
||||
#include "RenderTask.h"
|
||||
#include "Shaders/GPUVertexLayout.h"
|
||||
#include "Async/Tasks/GPUCopyResourceTask.h"
|
||||
#include "Engine/Core/Utilities.h"
|
||||
#include "Engine/Core/Types/String.h"
|
||||
@@ -75,6 +76,20 @@ GPUBufferDescription GPUBufferDescription::Vertex(GPUVertexLayout* layout, uint3
|
||||
return desc;
|
||||
}
|
||||
|
||||
GPUBufferDescription GPUBufferDescription::Vertex(GPUVertexLayout* layout, uint32 elementsCount, const void* data)
|
||||
{
|
||||
const uint32 stride = layout ? layout->GetStride() : 0;
|
||||
CHECK_RETURN_DEBUG(stride, GPUBufferDescription());
|
||||
return Vertex(layout, stride, elementsCount, data);
|
||||
}
|
||||
|
||||
GPUBufferDescription GPUBufferDescription::Vertex(GPUVertexLayout* layout, uint32 elementsCount, GPUResourceUsage usage)
|
||||
{
|
||||
const uint32 stride = layout ? layout->GetStride() : 0;
|
||||
CHECK_RETURN_DEBUG(stride, GPUBufferDescription());
|
||||
return Vertex(layout, stride, elementsCount, usage);
|
||||
}
|
||||
|
||||
void GPUBufferDescription::Clear()
|
||||
{
|
||||
Platform::MemoryClear(this, sizeof(GPUBufferDescription));
|
||||
|
||||
Reference in New Issue
Block a user