UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CanvasBatchedElementRenderItem.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 Canvas.h: Unreal canvas definition.
5=============================================================================*/
6
7#pragma once
8
9#include "CanvasTypes.h"
10#include "BatchedElements.h"
11
16{
17public:
31
36 {
37 delete Data;
38 }
39
46 {
47 return this;
48 }
49
58 virtual bool Render_RenderThread(FCanvasRenderContext& RenderContext, FMeshPassProcessorRenderState& DrawRenderState, const FCanvas* Canvas) override;
59
67 virtual bool Render_GameThread(const FCanvas* Canvas, FCanvasRenderThreadScope& RenderScope) override;
68
81 {
82 return( Data->BatchedElementParameters.GetReference() == BatchedElementParameters &&
83 Data->Texture == InTexture &&
84 Data->BlendMode == InBlendMode &&
85 Data->ElementType == InElementType &&
86 Data->Transform.GetMatrixCRC() == InTransform.GetMatrixCRC() &&
87 Data->GlowInfo == InGlowInfo );
88 }
89
96 {
97 return &Data->BatchedElements;
98 }
99
100private:
101 class FRenderData
102 {
103 public:
107 FRenderData(
109 const FTexture* InTexture=NULL,
114 : BatchedElementParameters(InBatchedElementParameters)
116 , BlendMode(InBlendMode)
117 , ElementType(InElementType)
118 , Transform(InTransform)
119 , GlowInfo(InGlowInfo)
120 {}
122 FBatchedElements BatchedElements;
124 TRefCountPtr<FBatchedElementParameters> BatchedElementParameters;
126 const FTexture* Texture;
128 ESimpleElementBlendMode BlendMode;
130 FCanvas::EElementType ElementType;
134 FDepthFieldGlowInfo GlowInfo;
135 };
136
141 FRenderData* Data;
142};
143
#define NULL
Definition oodle2base.h:134
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ESimpleElementBlendMode
Definition SceneTypes.h:191
@ SE_BLEND_MAX
Definition SceneTypes.h:212
Definition BatchedElements.h:88
Definition BatchedElements.h:102
Definition CanvasTypes.h:794
Definition CanvasBatchedElementRenderItem.h:16
virtual bool Render_RenderThread(FCanvasRenderContext &RenderContext, FMeshPassProcessorRenderState &DrawRenderState, const FCanvas *Canvas) override
Definition Canvas.cpp:468
FBatchedElements * GetBatchedElements()
Definition CanvasBatchedElementRenderItem.h:95
virtual bool Render_GameThread(const FCanvas *Canvas, FCanvasRenderThreadScope &RenderScope) override
Definition Canvas.cpp:507
virtual class FCanvasBatchedElementRenderItem * GetCanvasBatchedElementRenderItem() override
Definition CanvasBatchedElementRenderItem.h:45
FCanvasBatchedElementRenderItem(FBatchedElementParameters *InBatchedElementParameters=NULL, const FTexture *InTexture=NULL, ESimpleElementBlendMode InBlendMode=SE_BLEND_MAX, FCanvas::EElementType InElementType=FCanvas::ET_MAX, const FCanvas::FTransformEntry &InTransform=FCanvas::FTransformEntry(FMatrix::Identity), const FDepthFieldGlowInfo &InGlowInfo=FDepthFieldGlowInfo())
Definition CanvasBatchedElementRenderItem.h:21
bool IsMatch(FBatchedElementParameters *BatchedElementParameters, const FTexture *InTexture, ESimpleElementBlendMode InBlendMode, FCanvas::EElementType InElementType, const FCanvas::FTransformEntry &InTransform, const FDepthFieldGlowInfo &InGlowInfo)
Definition CanvasBatchedElementRenderItem.h:80
virtual ~FCanvasBatchedElementRenderItem()
Definition CanvasBatchedElementRenderItem.h:35
Definition CanvasRender.h:9
Definition CanvasRender.h:95
Definition CanvasTypes.h:537
Definition CanvasTypes.h:211
EElementType
Definition CanvasTypes.h:218
@ ET_MAX
Definition CanvasTypes.h:221
Definition RenderResource.h:354
Definition RefCounting.h:454
@ Transform
Definition AnimationUtils.cpp:594
Definition EngineTypes.h:4031
Definition MeshPassProcessor.h:2118
static CORE_API const TMatrix Identity
Definition Matrix.h:52