20#include "RenderingCommon.generated.h"
27class FSlateInstanceBufferUpdate;
36#define UE_SLATE_VERIFY_PIXELSIZE UE_BUILD_DEBUG
38#define SLATE_USE_32BIT_INDICES !PLATFORM_USES_GLES
40#if SLATE_USE_32BIT_INDICES
162 Deuteranope UMETA(DisplayName=
"Deuteranope (green weak/blind) (7% of males, 0.4% of females)"),
163 Protanope UMETA(DisplayName=
"Protanope (red weak/blind) (2% of males, 0.01% of females)"),
164 Tritanope UMETA(DisplayName=
"Tritanope (blue weak/blind) (0.0003% of males)"),
245 template<ESlateVertexRounding Rounding>
258 template<ESlateVertexRounding Rounding>
264 Vertex.TexCoords[2] = 1.0f;
265 Vertex.TexCoords[3] = 1.0f;
271 template<ESlateVertexRounding Rounding>
285 template<ESlateVertexRounding Rounding>
301#if UE_SLATE_VERIFY_PIXELSIZE
357 template<ESlateVertexRounding Rounding>
374static_assert(std::is_trivially_destructible_v<FSlateVertex>,
"FSlateVertex should be trivially destructible");
375static_assert(std::is_trivially_copyable_v<FSlateVertex> ==
true,
"FSlateVertex should be trivially copyable");
434static_assert(std::is_trivially_destructible_v<FShortRect>,
"FShortRect should be trivially destructible");
438 template<
typename IndexType, IndexType...Indices>
444 template<
typename IndexType, std::
size_t Num,
typename Indices = std::make_
integer_sequence<IndexType, Num>>
935 bool bWireFrame =
false;
942 UE_DEPRECATED(5.5,
"Use ICustomSlateElement::Draw instead.")
947 UE_DEPRECATED(5.5,
"Use ICustomSlateElement::Draw instead.")
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define DECLARE_CYCLE_STAT_EXTERN(CounterName, StatId, GroupId, API)
Definition Stats.h:679
#define DECLARE_DWORD_COUNTER_STAT_EXTERN(CounterName, StatId, GroupId, API)
Definition Stats.h:682
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
EFocusCause
Definition Events.h:25
UE::Math::TVector2< float > FVector2f
Definition MathFwd.h:74
UE::Math::TVector4< float > FVector4f
Definition MathFwd.h:75
#define UENUM(...)
Definition ObjectMacros.h:749
ESlateDrawPrimitive
Definition RenderingCommon.h:49
TArray< FSlateVertex > FSlateVertexArray
Definition RenderingCommon.h:462
ESlateBatchDrawFlag
Definition RenderingCommon.h:118
ESlateLineJoinType
Definition RenderingCommon.h:147
ESlateViewportDynamicRange
Definition RenderingCommon.h:175
ESlateDrawEffect
Definition RenderingCommon.h:89
ESlateVertexRounding
Definition RenderingCommon.h:169
TArray< FVector4f > FSlateInstanceBufferData
Definition RenderingCommon.h:968
TArray< SlateIndex > FSlateIndexArray
Definition RenderingCommon.h:463
ESlateShader
Definition RenderingCommon.h:60
EColorVisionDeficiency
Definition RenderingCommon.h:160
uint32 SlateIndex
Definition RenderingCommon.h:41
ESlatePostRT
Definition SlateRendererTypes.h:15
Definition CursorReply.h:16
static FCursorReply Unhandled()
Definition CursorReply.h:24
Definition NavigationReply.h:43
static FNavigationReply Stop()
Definition NavigationReply.h:106
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:571
Definition RHIResources.h:1581
Definition RHICommandList.h:3819
static FReply Unhandled()
Definition Reply.h:241
Definition ElementBatcher.h:246
Definition SlateRect.h:26
Definition SlateRenderBatch.h:45
Definition SlateShaderResource.h:44
Definition DrawElements.h:220
Definition RenderingCommon.h:903
virtual PRAGMA_ENABLE_DEPRECATION_WARNINGS bool UsesAdditionalRHIParams() const
Definition RenderingCommon.h:948
struct UE_DEPRECATED(5.5, "Use ICustomSlateElement::Draw instead") FSlateCustomDrawParams
Definition RenderingCommon.h:928
virtual ~ICustomSlateElement()
Definition RenderingCommon.h:905
virtual void PostCustomElementAdded(FSlateElementBatcher &ElementBatcher) const
Definition RenderingCommon.h:908
virtual void DrawRenderThread(FRHICommandListImmediate &RHICmdList, const void *RenderTarget)
Definition RenderingCommon.h:940
virtual void Draw_RenderThread(FRDGBuilder &GraphBuilder, const FDrawPassInputs &Inputs)
Definition RenderingCommon.h:923
Definition RenderingCommon.h:957
virtual ~ISlateUpdatableInstanceBufferRenderProxy()
Definition RenderingCommon.h:959
virtual FRHIBuffer * GetRHI() const =0
virtual void BindStreamSource(class FRHICommandList &RHICmdList, int32 StreamIndex, uint32 InstanceOffset)
Definition RenderingCommon.h:965
Definition RenderingCommon.h:974
virtual ~ISlateUpdatableInstanceBuffer()
Definition RenderingCommon.h:976
friend class FSlateInstanceBufferUpdate
Definition RenderingCommon.h:977
virtual void Update(FSlateInstanceBufferData &Data)=0
virtual ISlateUpdatableInstanceBufferRenderProxy * GetRenderProxy() const =0
virtual uint32 GetNumInstances() const =0
Definition RenderingCommon.h:471
virtual FReply OnTouchGesture(const FGeometry &MyGeometry, const FPointerEvent &InGestureEvent)
Definition RenderingCommon.h:779
virtual FReply OnKeyDown(const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
Definition RenderingCommon.h:671
virtual bool RequiresVsync() const =0
virtual FVector2D GetSoftwareCursorPosition() const
Definition RenderingCommon.h:582
virtual FReply OnMouseButtonUp(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition RenderingCommon.h:608
virtual FReply OnTouchStarted(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
Definition RenderingCommon.h:729
virtual bool IsViewportTextureAlphaOnly() const
Definition RenderingCommon.h:502
virtual FReply OnRequestWindowClose()
Definition RenderingCommon.h:863
virtual FPopupMethodReply OnQueryPopupMethod() const
Definition RenderingCommon.h:817
virtual FReply OnAnalogValueChanged(const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
Definition RenderingCommon.h:696
virtual FReply OnMouseButtonDown(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition RenderingCommon.h:595
virtual FReply OnMotionDetected(const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
Definition RenderingCommon.h:790
virtual void OnFocusLost(const FFocusEvent &InFocusEvent)
Definition RenderingCommon.h:850
virtual void OnMouseEnter(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition RenderingCommon.h:614
virtual ~ISlateViewport()
Definition RenderingCommon.h:473
virtual class FSlateShaderResource * GetViewportRenderTargetTexture() const =0
virtual bool IsStereoscopic3D() const
Definition RenderingCommon.h:510
virtual TOptional< TSharedRef< SWidget > > OnMapCursor(const FCursorReply &CursorReply)
Definition RenderingCommon.h:566
virtual FCursorReply OnCursorQuery(const FGeometry &MyGeometry, const FPointerEvent &CursorEvent)
Definition RenderingCommon.h:556
virtual FReply OnMouseWheel(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition RenderingCommon.h:645
virtual FReply OnKeyUp(const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
Definition RenderingCommon.h:684
virtual FReply OnKeyChar(const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
Definition RenderingCommon.h:709
virtual FReply OnMouseMove(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition RenderingCommon.h:632
virtual ESlateViewportDynamicRange GetViewportDynamicRange() const
Definition RenderingCommon.h:526
virtual void Tick(const FGeometry &AllottedGeometry, double InCurrentTime, float DeltaTime)
Definition RenderingCommon.h:534
virtual FIntPoint GetSize() const =0
virtual TWeakPtr< SWidget > GetWidget()
Definition RenderingCommon.h:878
virtual void OnViewportClosed()
Definition RenderingCommon.h:871
virtual bool HandleNavigation(const uint32 InUserIndex, TSharedPtr< SWidget > InDestination)
Definition RenderingCommon.h:840
virtual FReply OnMouseButtonDoubleClick(const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
Definition RenderingCommon.h:658
virtual void OnFinishedPointerInput()
Definition RenderingCommon.h:808
virtual bool IsSoftwareCursorVisible() const
Definition RenderingCommon.h:574
virtual FReply OnTouchEnded(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
Definition RenderingCommon.h:749
virtual FReply OnViewportActivated(const FWindowActivateEvent &InActivateEvent)
Definition RenderingCommon.h:886
virtual FNavigationReply OnNavigation(const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
Definition RenderingCommon.h:828
virtual EPixelFormat GetSceneTargetFormat() const
Definition RenderingCommon.h:497
virtual void OnDrawViewport(const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, class FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled)
Definition RenderingCommon.h:482
virtual FReply OnTouchMoved(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
Definition RenderingCommon.h:739
virtual FReply OnTouchForceChanged(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
Definition RenderingCommon.h:759
virtual bool UseSeparateRenderTarget() const
Definition RenderingCommon.h:518
virtual bool AllowScaling() const
Definition RenderingCommon.h:546
virtual FReply OnTouchFirstMove(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
Definition RenderingCommon.h:769
virtual void OnMouseLeave(const FPointerEvent &MouseEvent)
Definition RenderingCommon.h:619
virtual void OnViewportDeactivated(const FWindowActivateEvent &InActivateEvent)
Definition RenderingCommon.h:894
virtual FReply OnFocusReceived(const FFocusEvent &InFocusEvent)
Definition RenderingCommon.h:719
virtual TOptional< bool > OnQueryShowFocus(const EFocusCause InFocusCause) const
Definition RenderingCommon.h:800
Definition SharedPointer.h:692
Definition SharedPointer.h:1295
Definition DockingUtilsPrivate.h:8
auto MakeTupleIndicies()
Definition RenderingCommon.h:445
auto MakeTupleIndiciesInner(std::integer_sequence< IndexType, Indices... >)
Definition RenderingCommon.h:439
Definition UnrealMathUtility.h:270
Definition RenderingCommon.h:187
FVector4f PixelParams3
Definition RenderingCommon.h:191
FVector4f PixelParams2
Definition RenderingCommon.h:190
bool operator==(const FShaderParams &Other) const
Definition RenderingCommon.h:205
FShaderParams(const FVector4f &InPixelParams, const FVector4f &InPixelParams2=FVector4f(0), const FVector4f &InPixelParams3=FVector4f(0))
Definition RenderingCommon.h:199
FVector4f PixelParams
Definition RenderingCommon.h:189
static FShaderParams MakePixelShaderParams(const FVector4f &PixelShaderParams, const FVector4f &InPixelShaderParams2=FVector4f(0), const FVector4f &InPixelShaderParams3=FVector4f(0))
Definition RenderingCommon.h:210
FShaderParams()
Definition RenderingCommon.h:193
Definition RenderingCommon.h:379
uint16 Top
Definition RenderingCommon.h:428
uint16 Right
Definition RenderingCommon.h:429
bool DoesIntersect(const FSlateRect &B) const
Definition RenderingCommon.h:415
bool operator==(const FShortRect &RHS) const
Definition RenderingCommon.h:404
bool operator!=(const FShortRect &RHS) const
Definition RenderingCommon.h:405
FShortRect()
Definition RenderingCommon.h:380
uint16 Bottom
Definition RenderingCommon.h:430
FVector2f GetBottomRight() const
Definition RenderingCommon.h:425
bool DoesIntersect(const FShortRect &B) const
Definition RenderingCommon.h:406
uint16 Left
Definition RenderingCommon.h:427
FShortRect(uint16 InLeft, uint16 InTop, uint16 InRight, uint16 InBottom)
Definition RenderingCommon.h:388
FVector2f GetTopLeft() const
Definition RenderingCommon.h:424
FShortRect(const FSlateRect &Rect)
Definition RenderingCommon.h:396
Definition RenderingCommon.h:221
FSlateVertex()
Definition RenderingCommon.h:240
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector2f InTexCoord, const FVector2f InTexCoord2, const FColor InColor, const FColor SecondaryColor=FColor(), const ESlateVertexRounding InRounding=ESlateVertexRounding::Disabled)
Definition RenderingCommon.h:311
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector2f InTexCoord, const FVector2f InTexCoord2, const FColor InColor, const FColor SecondaryColor=FColor())
Definition RenderingCommon.h:246
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector2f InTexCoord, const FColor &InColor, const FColor SecondaryColor=FColor())
Definition RenderingCommon.h:259
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector4f InTexCoords, const FVector2f InMaterialTexCoords, const FColor InColor, const FColor SecondaryColor=FColor())
Definition RenderingCommon.h:272
void SetTexCoords(const FVector4f InTexCoords)
Definition RenderingCommon.h:342
FColor Color
Definition RenderingCommon.h:232
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector2f InLocalSize, float Scale, const FVector4f InTexCoords, const FColor InColor, const FColor SecondaryColor=FColor(), const ESlateVertexRounding InRounding=ESlateVertexRounding::Disabled)
Definition RenderingCommon.h:335
FColor SecondaryColor
Definition RenderingCommon.h:235
void SetPosition(const FVector2f InPosition)
Definition RenderingCommon.h:350
FVector2f Position
Definition RenderingCommon.h:229
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector4f InTexCoords, const FVector2f InMaterialTexCoords, const FColor InColor, const FColor SecondaryColor=FColor(), const ESlateVertexRounding InRounding=ESlateVertexRounding::Disabled)
Definition RenderingCommon.h:327
uint16 PixelSize[2]
Definition RenderingCommon.h:238
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector2f InLocalSize, float Scale, const FVector4f InTexCoords, const FColor InColor, const FColor SecondaryColor=FColor())
Definition RenderingCommon.h:286
FVector2f MaterialTexCoords
Definition RenderingCommon.h:226
static FSlateVertex Make(const FSlateRenderTransform &RenderTransform, const FVector2f InLocalPosition, const FVector2f InTexCoord, const FColor &InColor, const FColor SecondaryColor=FColor(), const ESlateVertexRounding InRounding=ESlateVertexRounding::Disabled)
Definition RenderingCommon.h:319
float TexCoords[4]
Definition RenderingCommon.h:223
Definition LinuxPlatformSplash.cpp:43
Definition IsPODType.h:12
@ Value
Definition IsPODType.h:13
Definition Optional.h:131
T Y
Definition Vector2D.h:52
T X
Definition Vector2D.h:49
static CORE_API const TVector2< double > ZeroVector
Definition Vector2D.h:63