From 0f619c2cb69241969fea23e84ad55a5250fd6617 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 3 Nov 2022 00:19:21 +0100 Subject: [PATCH] Simplify code --- Source/Engine/Renderer/DrawCall.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Source/Engine/Renderer/DrawCall.h b/Source/Engine/Renderer/DrawCall.h index 86a73ef9e..ccac4a46e 100644 --- a/Source/Engine/Renderer/DrawCall.h +++ b/Source/Engine/Renderer/DrawCall.h @@ -292,31 +292,23 @@ struct GeometryDrawStateData /// /// The previous frame world transformation matrix for the given geometry instance. /// - Matrix PrevWorld; + Matrix PrevWorld = Matrix::Identity; /// /// The previous frame index. In sync with Engine::FrameCount used to detect new frames and rendering gaps to reset state. /// - uint64 PrevFrame; + uint64 PrevFrame = 0; /// /// The previous frame model LOD index used. It's locked during LOD transition to cache the transition start LOD. /// - char PrevLOD; + char PrevLOD = -1; /// /// The LOD transition timer. Value 255 means the end of the transition (aka no transition), value 0 means transition started. /// Interpolated between 0-255 to smooth transition over several frames and reduce LOD changing artifacts. /// - byte LODTransition; - - GeometryDrawStateData() - { - PrevWorld = Matrix::Identity; - PrevFrame = 0; - PrevLOD = -1; - LODTransition = 255; - } + byte LODTransition = 255; }; template<>