9 : UsageFlags(InUpdateFrequency ==
EUpdateFrequency::Frequent? BUF_Dynamic : BUF_Static)
10 , VertexSize(InVertexSize)
12 , ShaderResourceView(nullptr)
28 FRHIResourceCreateInfo CreateInfo;
32 #if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 19 33 if (RHISupportsManualVertexFetch(GMaxRHIShaderPlatform))
62 check(VertexBufferRHI.IsValid());
65 void* Buffer = RHILockVertexBuffer(VertexBufferRHI, 0, Data.Num(), RLM_WriteOnly);
68 FMemory::Memcpy(Buffer, Data.GetData(), Data.Num());
71 RHIUnlockVertexBuffer(VertexBufferRHI);
77 : NumIndices(0), IndexSize(-1),
UsageFlags(EBufferUsageFlags::BUF_None)
85 UsageFlags = InUpdateFrequency == EUpdateFrequency::Frequent ? BUF_Dynamic : BUF_Static;
95 FRHIResourceCreateInfo CreateInfo;
121 check(IndexBufferRHI.IsValid());
124 void* Buffer = RHILockIndexBuffer(IndexBufferRHI, 0, Data.Num(), RLM_WriteOnly);
127 FMemory::Memcpy(Buffer, Data.GetData(), Data.Num());
130 RHIUnlockIndexBuffer(IndexBufferRHI);
138 : FLocalVertexFactory(
139 #if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 19
140 InFeatureLevel,
"FRuntimeMeshVertexFactory" 143 , SectionParent(InSectionParent)
150 if (IsInRenderingThread())
152 SetData(VertexStructure);
158 ENQUEUE_RENDER_COMMAND(InitRuntimeMeshVertexFactory)(
159 [
this, VertexStructure](FRHICommandListImmediate & RHICmdList)
161 Init(VertexStructure);
170 #if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 19
const EBufferUsageFlags UsageFlags
int32 GetBufferSize() const
FRuntimeMeshVertexFactory(ERHIFeatureLevel::Type InFeatureLevel, FRuntimeMeshSectionProxy *InSectionParent)
void SetNum(int32 NewIndexCount)
int32 GetBufferSize() const
virtual void InitRHI() override
EBufferUsageFlags UsageFlags
static const textual_icon check
void Reset(int32 InIndexSize, int32 InNumIndices, EUpdateFrequency InUpdateFrequency)
void SetData(const TArray< uint8 > &Data)
void Reset(int32 InNumVertices)
FRuntimeMeshVertexBuffer(EUpdateFrequency InUpdateFrequency, int32 InVertexSize)
FRuntimeMeshSectionProxy * SectionParent
FRuntimeMeshIndexBuffer()
void SetData(const TArray< uint8 > &Data)
virtual void InitRHI() override
void SetNum(int32 NewVertexCount)
void Init(FLocalVertexFactory::FDataType VertexStructure)
virtual uint64 GetStaticBatchElementVisibility(const class FSceneView &View, const struct FMeshBatch *Batch) const