Add GPUVertexLayout to graphics backends
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "GPUTimerQueryNull.h"
|
||||
#include "GPUBufferNull.h"
|
||||
#include "GPUSamplerNull.h"
|
||||
#include "GPUVertexLayoutNull.h"
|
||||
#include "GPUSwapChainNull.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/Async/GPUTasksManager.h"
|
||||
@@ -172,6 +173,11 @@ GPUSampler* GPUDeviceNull::CreateSampler()
|
||||
return New<GPUSamplerNull>();
|
||||
}
|
||||
|
||||
GPUVertexLayout* GPUDeviceNull::CreateVertexLayout(const VertexElements& elements)
|
||||
{
|
||||
return New<GPUVertexLayoutNull>(elements);
|
||||
}
|
||||
|
||||
GPUSwapChain* GPUDeviceNull::CreateSwapChain(Window* window)
|
||||
{
|
||||
return New<GPUSwapChainNull>(window);
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
GPUTimerQuery* CreateTimerQuery() override;
|
||||
GPUBuffer* CreateBuffer(const StringView& name) override;
|
||||
GPUSampler* CreateSampler() override;
|
||||
GPUVertexLayout* CreateVertexLayout(const VertexElements& elements) override;
|
||||
GPUSwapChain* CreateSwapChain(Window* window) override;
|
||||
GPUConstantBuffer* CreateConstantBuffer(uint32 size, const StringView& name) override;
|
||||
};
|
||||
|
||||
22
Source/Engine/GraphicsDevice/Null/GPUVertexLayoutNull.h
Normal file
22
Source/Engine/GraphicsDevice/Null/GPUVertexLayoutNull.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#if GRAPHICS_API_NULL
|
||||
|
||||
#include "Engine/Graphics/Shaders/GPUVertexLayout.h"
|
||||
|
||||
/// <summary>
|
||||
/// Vertex layout for Null backend.
|
||||
/// </summary>
|
||||
class GPUVertexLayoutNull : public GPUVertexLayout
|
||||
{
|
||||
public:
|
||||
GPUVertexLayoutNull(const Elements& elements)
|
||||
: GPUVertexLayout()
|
||||
{
|
||||
_elements = elements;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user