UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateRenderBatch.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "RenderingCommon.h"
6#include "Layout/Clipping.h"
8#include <type_traits>
9
13class FSlateRenderDataHandle;
14
16
17
19{
29
31 {
32 return Layer == Other.Layer
33 && ShaderParams == Other.ShaderParams
34 && Resource == Other.Resource
35 && PrimitiveType == Other.PrimitiveType
36 && ShaderType == Other.ShaderType
37 && DrawEffects == Other.DrawEffects
38 && DrawFlags == Other.DrawFlags
39 && SceneIndex == Other.SceneIndex
40 && ClippingState == Other.ClippingState;
41 }
42};
43
45{
46public:
60
65
70
77
83
89
95
101
107
113
119
121 {
122 return NumVertices;
123 }
124
126 {
127 return NumIndices;
128 }
129
131 {
132 return VertexOffset;
133 }
134
136 {
137 return IndexOffset;
138 }
139
140 bool HasVertexData() const
141 {
142 return NumVertices > 0 && NumIndices > 0;
143 }
144
146 {
147 return
148 ShaderResource == Other.ShaderResource
149 && DrawFlags == Other.DrawFlags
150 && ShaderType == Other.ShaderType
151 && DrawPrimitiveType == Other.DrawPrimitiveType
152 && DrawEffects == Other.DrawEffects
153 && ShaderParams == Other.ShaderParams
154 && InstanceData == Other.InstanceData
155 && InstanceCount == Other.InstanceCount
156 && InstanceOffset == Other.InstanceOffset
157 && DynamicOffset == Other.DynamicOffset
158 && CustomDrawer == Other.CustomDrawer
159 && SceneIndex == Other.SceneIndex
160 && ClippingState == Other.ClippingState;
161 }
162
163 int32 GetLayer() const { return LayerId; }
164
166
168
170
172
174
176
177 const FShaderParams& GetShaderParams() const { return ShaderParams; }
178
180 {
181 return (NumVertices > 0 && NumIndices > 0) || CustomDrawer != nullptr || ShaderType == ESlateShader::PostProcess;
182 }
183public:
185
188
191
194
196
197 // Source Data
199
201
203
206
208
210
213
216
218
220
222
224
226
228
230
232
234
237
239};
240
241static_assert(TIsTriviallyCopyConstructible<FSlateRenderBatch>::Value == true, "FSlateRenderBatch must be mem copyable");
242static_assert(std::is_trivially_destructible_v<FSlateRenderBatch>, "FSlateRenderBatch must be trivially destructible");
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
@ Num
Definition MetalRHIPrivate.h:234
@ Vertex
Definition MetalRHIPrivate.h:223
ESlateDrawPrimitive
Definition RenderingCommon.h:49
ESlateBatchDrawFlag
Definition RenderingCommon.h:118
ESlateDrawEffect
Definition RenderingCommon.h:89
ESlateShader
Definition RenderingCommon.h:60
uint32 SlateIndex
Definition RenderingCommon.h:41
ESlatePostRT
Definition SlateRendererTypes.h:15
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Clipping.h:207
Definition ElementBatcher.h:44
Definition SlateRenderBatch.h:45
uint32 GetNumIndices() const
Definition SlateRenderBatch.h:125
FSlateIndexArray * SourceIndices
Definition SlateRenderBatch.h:200
uint8 bIsMergable
Definition SlateRenderBatch.h:236
int32 IndexOffset
Definition SlateRenderBatch.h:209
ESlateShader GetShaderType() const
Definition SlateRenderBatch.h:175
void EmplaceVertex(FSlateVertex &&Vertex)
Definition SlateRenderBatch.h:84
int32 VertexOffset
Definition SlateRenderBatch.h:207
FVector2f DynamicOffset
Definition SlateRenderBatch.h:187
ESlateBatchDrawFlag GetDrawFlags() const
Definition SlateRenderBatch.h:171
const FSlateShaderResource * ShaderResource
Definition SlateRenderBatch.h:193
uint32 GetNumVertices() const
Definition SlateRenderBatch.h:120
int32 NumVertices
Definition SlateRenderBatch.h:212
int32 GetLayer() const
Definition SlateRenderBatch.h:163
const FSlateClippingState * GetClippingState() const
Definition SlateRenderBatch.h:165
int32 InstanceOffset
Definition SlateRenderBatch.h:221
ESlatePostRT CachedUsedPostBuffers
Definition SlateRenderBatch.h:231
void ReserveIndices(uint32 Num)
Definition SlateRenderBatch.h:66
void AddVertices(TArray< FSlateVertex > &&InVertices)
Definition SlateRenderBatch.h:108
ESlateDrawPrimitive DrawPrimitiveType
Definition SlateRenderBatch.h:227
ESlateShader ShaderType
Definition SlateRenderBatch.h:225
int8 SceneIndex
Definition SlateRenderBatch.h:233
void AddIndices(TArray< SlateIndex > &&InIndices)
Definition SlateRenderBatch.h:114
bool IsBatchableWith(const FSlateRenderBatch &Other) const
Definition SlateRenderBatch.h:145
void AddVertices(const TArray< FSlateVertex > &InVertices)
Definition SlateRenderBatch.h:96
void AddVertex(FSlateVertex &&Vertex)
Definition SlateRenderBatch.h:71
bool IsValidForRendering() const
Definition SlateRenderBatch.h:179
int32 NextBatchIndex
Definition SlateRenderBatch.h:217
const FSlateShaderResource * GetShaderResource() const
Definition SlateRenderBatch.h:167
int32 InstanceCount
Definition SlateRenderBatch.h:219
uint8 bIsMerged
Definition SlateRenderBatch.h:238
FSlateVertexArray * SourceVertices
Definition SlateRenderBatch.h:198
int32 NumIndices
Definition SlateRenderBatch.h:215
const FShaderParams & GetShaderParams() const
Definition SlateRenderBatch.h:177
void ReserveVertices(uint32 Num)
Definition SlateRenderBatch.h:61
int32 LayerId
Definition SlateRenderBatch.h:205
bool HasVertexData() const
Definition SlateRenderBatch.h:140
const FSlateClippingState * ClippingState
Definition SlateRenderBatch.h:190
uint32 GetIndexOffset() const
Definition SlateRenderBatch.h:135
ESlateDrawEffect GetDrawEffects() const
Definition SlateRenderBatch.h:173
uint32 GetVertexOffset() const
Definition SlateRenderBatch.h:130
ICustomSlateElement * CustomDrawer
Definition SlateRenderBatch.h:202
ESlateDrawEffect DrawEffects
Definition SlateRenderBatch.h:229
FShaderParams ShaderParams
Definition SlateRenderBatch.h:184
ESlateDrawPrimitive GetDrawPrimitiveType() const
Definition SlateRenderBatch.h:169
ESlateBatchDrawFlag DrawFlags
Definition SlateRenderBatch.h:223
ISlateUpdatableInstanceBufferRenderProxy * InstanceData
Definition SlateRenderBatch.h:195
void EmplaceIndex(SlateIndex Index)
Definition SlateRenderBatch.h:90
void AddIndex(SlateIndex Index)
Definition SlateRenderBatch.h:78
void AddIndices(const TArray< SlateIndex > &InIndices)
Definition SlateRenderBatch.h:102
Definition SlateShaderResource.h:44
Definition RenderingCommon.h:903
Definition RenderingCommon.h:957
UE_FORCEINLINE_HINT SizeType AddUninitialized()
Definition Array.h:1664
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
UE_FORCEINLINE_HINT SizeType Emplace(ArgsType &&... Args)
Definition Array.h:2561
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
void Append(const TArray< OtherElementType, OtherAllocatorType > &Source)
Definition Array.h:2412
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
U16 Index
Definition radfft.cpp:71
Definition RenderingCommon.h:187
Definition SlateRenderBatch.h:19
FShaderParams ShaderParams
Definition SlateRenderBatch.h:21
ESlateBatchDrawFlag DrawFlags
Definition SlateRenderBatch.h:26
ESlateDrawPrimitive PrimitiveType
Definition SlateRenderBatch.h:23
ESlateShader ShaderType
Definition SlateRenderBatch.h:24
int32 Layer
Definition SlateRenderBatch.h:20
const FSlateClippingState * ClippingState
Definition SlateRenderBatch.h:28
ESlateDrawEffect DrawEffects
Definition SlateRenderBatch.h:25
int8 SceneIndex
Definition SlateRenderBatch.h:27
const FSlateShaderResource * Resource
Definition SlateRenderBatch.h:22
bool IsBatchableWith(const FSlateRenderBatchParams &Other) const
Definition SlateRenderBatch.h:30
Definition RenderingCommon.h:221
Definition IsTriviallyCopyConstructible.h:13