diff --git a/Source/Engine/Animations/AlphaBlend.h b/Source/Engine/Animations/AlphaBlend.h
index 93169e79b..6ca9384e5 100644
--- a/Source/Engine/Animations/AlphaBlend.h
+++ b/Source/Engine/Animations/AlphaBlend.h
@@ -86,7 +86,6 @@ API_ENUM() enum class AlphaBlendMode : byte
class AlphaBlend
{
public:
-
///
/// Converts the input alpha value from a linear 0-1 value into the output alpha described by blend mode.
///
diff --git a/Source/Engine/Animations/AnimationData.h b/Source/Engine/Animations/AnimationData.h
index 4356d9941..28bd0229e 100644
--- a/Source/Engine/Animations/AnimationData.h
+++ b/Source/Engine/Animations/AnimationData.h
@@ -12,7 +12,6 @@
struct NodeAnimationData
{
public:
-
///
/// The target node name.
///
@@ -34,7 +33,6 @@ public:
LinearCurve Scale;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -46,7 +44,6 @@ public:
}
public:
-
///
/// Evaluates the animation transformation at the specified time (only for the curves with non-empty data).
///
@@ -98,7 +95,6 @@ public:
struct AnimationData
{
public:
-
///
/// The duration of the animation (in frames).
///
@@ -125,7 +121,6 @@ public:
Array Channels;
public:
-
///
/// Gets the length of the animation (in seconds).
///
diff --git a/Source/Engine/Animations/Animations.cpp b/Source/Engine/Animations/Animations.cpp
index 0f8bec912..f4e0e5952 100644
--- a/Source/Engine/Animations/Animations.cpp
+++ b/Source/Engine/Animations/Animations.cpp
@@ -11,7 +11,6 @@
class AnimationsService : public EngineService
{
public:
-
AnimationsService()
: EngineService(TEXT("Animations"), -10)
{
diff --git a/Source/Engine/Animations/Animations.h b/Source/Engine/Animations/Animations.h
index 9a04171d4..368c4187b 100644
--- a/Source/Engine/Animations/Animations.h
+++ b/Source/Engine/Animations/Animations.h
@@ -14,7 +14,7 @@ class Asset;
///
API_CLASS(Static) class FLAXENGINE_API Animations
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Animations);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Animations);
///
/// The system for Animations update.
diff --git a/Source/Engine/Animations/Curve.h b/Source/Engine/Animations/Curve.h
index 9461c8626..40080c8bf 100644
--- a/Source/Engine/Animations/Curve.h
+++ b/Source/Engine/Animations/Curve.h
@@ -286,15 +286,12 @@ template>
class CurveBase
{
public:
-
typedef Span KeyFrameData;
protected:
-
T _default;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -320,7 +317,6 @@ public:
}
public:
-
///
/// Gets the default value for the keyframes.
///
@@ -338,7 +334,6 @@ public:
}
public:
-
///
/// Evaluates the animation curve value at the specified time.
///
@@ -466,7 +461,6 @@ public:
}
protected:
-
///
/// Returns a pair of keys that can be used for interpolating to field the value at the provided time.
///
@@ -507,16 +501,13 @@ template>
class Curve : public CurveBase
{
public:
-
typedef CurveBase Base;
using KeyFrameCollection = Array;
private:
-
KeyFrameCollection _keyframes;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -552,7 +543,6 @@ public:
}
public:
-
///
/// Gets the length of the animation curve, from time zero to last keyframe.
///
@@ -627,7 +617,6 @@ public:
}
public:
-
///
/// Evaluates the animation curve value at the specified time.
///
@@ -745,7 +734,6 @@ public:
}
public:
-
FORCE_INLINE KeyFrame& operator[](int32 index)
{
return _keyframes[index];
diff --git a/Source/Engine/Animations/Graph/AnimGraph.Base.cpp b/Source/Engine/Animations/Graph/AnimGraph.Base.cpp
index 35b9793d0..2bab992df 100644
--- a/Source/Engine/Animations/Graph/AnimGraph.Base.cpp
+++ b/Source/Engine/Animations/Graph/AnimGraph.Base.cpp
@@ -135,21 +135,21 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
// Check if this node needs a state container
switch (n->GroupID)
{
- // Tools
+ // Tools
case 7:
switch (n->TypeID)
{
- // Time
+ // Time
case 5:
ADD_BUCKET(AnimationBucketInit);
break;
}
break;
- // Animation
+ // Animation
case 9:
switch (n->TypeID)
{
- // Output
+ // Output
case 1:
_rootNode = n;
if (_rootNode->Values.Count() < 1)
@@ -158,16 +158,16 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
_rootNode->Values[0] = (int32)RootMotionMode::NoExtraction;
}
break;
- // Animation
+ // Animation
case 2:
ADD_BUCKET(AnimationBucketInit);
n->Assets[0] = (Asset*)Content::LoadAsync((Guid)n->Values[0]);
break;
- // Blend with Mask
+ // Blend with Mask
case 11:
n->Assets[0] = (Asset*)Content::LoadAsync((Guid)n->Values[1]);
break;
- // Multi Blend 1D
+ // Multi Blend 1D
case 12:
{
ADD_BUCKET(MultiBlendBucketInit);
@@ -183,7 +183,7 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
Sorting::SortArray(n->Data.MultiBlend1D.IndicesSorted, ANIM_GRAPH_MULTI_BLEND_MAX_ANIMS, &SortMultiBlend1D, n);
break;
}
- // Multi Blend 2D
+ // Multi Blend 2D
case 13:
{
ADD_BUCKET(MultiBlendBucketInit);
@@ -239,13 +239,13 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
break;
}
- // Blend Pose
+ // Blend Pose
case 14:
{
ADD_BUCKET(BlendPoseBucketInit);
break;
}
- // State Machine
+ // State Machine
case 18:
{
ADD_BUCKET(StateMachineBucketInit);
@@ -261,7 +261,7 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
break;
}
- // Entry
+ // Entry
case 19:
{
const auto entryTargetId = (int32)n->Values[0];
@@ -273,7 +273,7 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
_rootNode = entryTarget;
break;
}
- // State
+ // State
case 20:
{
// Load the graph
@@ -370,19 +370,19 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
break;
}
- // State Output
+ // State Output
case 21:
{
_rootNode = n;
break;
}
- // Rule Output
+ // Rule Output
case 22:
{
_rootNode = n;
break;
}
- // Animation Graph Function
+ // Animation Graph Function
case 24:
{
auto& data = n->Data.AnimationGraphFunction;
@@ -401,9 +401,9 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
data.Graph = LoadSubGraph(graphData.Get(), graphData.Length(), TEXT("Animation Graph Function"));
break;
}
- // Transform Node (local/model space)
- // Get Node Transform (local/model space)
- // IK Aim, Two Bone IK
+ // Transform Node (local/model space)
+ // Get Node Transform (local/model space)
+ // IK Aim, Two Bone IK
case 25:
case 26:
case 28:
@@ -418,7 +418,7 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
data.NodeIndex = -1;
break;
}
- // Copy Node
+ // Copy Node
case 27:
{
auto& data = n->Data.CopyNode;
@@ -442,7 +442,7 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
}
}
break;
- // Custom
+ // Custom
case 13:
{
// Clear data
diff --git a/Source/Engine/Animations/Graph/AnimGraph.h b/Source/Engine/Animations/Graph/AnimGraph.h
index 70c3d9696..0b74b9d6c 100644
--- a/Source/Engine/Animations/Graph/AnimGraph.h
+++ b/Source/Engine/Animations/Graph/AnimGraph.h
@@ -167,7 +167,6 @@ enum class RootMotionMode
class AnimGraphStateTransition
{
public:
-
///
/// The transition flag types.
///
@@ -195,7 +194,6 @@ public:
};
public:
-
///
/// The destination state node.
///
@@ -230,9 +228,8 @@ DECLARE_ENUM_OPERATORS(AnimGraphStateTransition::FlagTypes);
///
API_CLASS() class AnimGraphParameter : public VisjectGraphParameter
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(AnimGraphParameter, VisjectGraphParameter);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(AnimGraphParameter, VisjectGraphParameter);
public:
-
AnimGraphParameter(const AnimGraphParameter& other)
: AnimGraphParameter()
{
@@ -271,7 +268,6 @@ class FLAXENGINE_API AnimGraphInstanceData
{
friend AnimGraphExecutor;
public:
-
// ---- Quick documentation ----
// AnimGraphInstanceData holds a single animation graph instance playback data.
// It has parameters (the same layout as graph) that can be modified per instance (eg. by game scripts).
@@ -335,7 +331,6 @@ public:
};
public:
-
///
/// The instance data version number. Used to sync the Anim Graph data with the instance state. Handles Anim Graph reloads to ensure data is valid.
///
@@ -392,7 +387,6 @@ public:
Array> Slots;
public:
-
///
/// Clears this container data.
///
@@ -409,7 +403,6 @@ public:
void Invalidate();
private:
-
struct Event
{
AnimEvent* Instance;
@@ -433,7 +426,6 @@ struct AnimGraphTransitionData
class AnimGraphBox : public VisjectGraphBox
{
public:
-
AnimGraphBox()
{
}
@@ -452,7 +444,6 @@ public:
class AnimGraphNode : public VisjectGraphNode
{
public:
-
struct MultiBlend1DData
{
///
@@ -575,7 +566,6 @@ public:
};
public:
-
///
/// The animation graph.
///
@@ -592,13 +582,11 @@ public:
AdditionalData Data;
public:
-
AnimGraphNode()
{
}
public:
-
///
/// Gets the per-node node transformations cache (cached).
///
@@ -614,7 +602,6 @@ public:
class AnimGraphBase : public VisjectGraph
{
protected:
-
AnimGraph* _graph;
Node* _rootNode = nullptr;
@@ -624,7 +611,6 @@ protected:
}
public:
-
///
/// The sub graphs nested in this graph.
///
@@ -651,7 +637,6 @@ public:
int32 BucketsCountTotal;
public:
-
///
/// Finalizes an instance of the class.
///
@@ -661,7 +646,6 @@ public:
}
public:
-
///
/// Gets the root node of the graph (cache don load).
///
@@ -680,7 +664,6 @@ public:
AnimSubGraph* LoadSubGraph(const void* data, int32 dataLength, const Char* name);
public:
-
// [Graph]
bool Load(ReadStream* stream, bool loadMeta) override;
void Clear() override;
@@ -689,7 +672,6 @@ public:
#endif
protected:
-
// [Graph]
bool onNodeLoaded(Node* n) override;
};
@@ -707,7 +689,6 @@ class AnimSubGraph : public AnimGraphBase
friend AnimGraphParameter;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -730,7 +711,6 @@ class AnimGraph : public AnimGraphBase
friend AnimGraphExecutor;
private:
-
typedef void (*InitBucketHandler)(AnimGraphInstanceData::Bucket&);
bool _isFunction, _isRegisteredForScriptingEvents;
@@ -740,7 +720,6 @@ private:
Asset* _owner;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -758,7 +737,6 @@ public:
~AnimGraph();
public:
-
///
/// The Anim Graph data version number. Used to sync the Anim Graph data with the instances state. Handles Anim Graph reloads to ensure data is valid.
///
@@ -773,7 +751,6 @@ public:
AssetReference BaseModel;
public:
-
///
/// Determines whether this graph is ready for the animation evaluation.
///
@@ -787,7 +764,6 @@ public:
bool CanUseWithSkeleton(SkinnedModel* other) const;
private:
-
void ClearCustomNode(Node* node);
bool InitCustomNode(Node* node);
@@ -798,7 +774,6 @@ private:
void OnScriptsLoaded();
public:
-
// [Graph]
bool Load(ReadStream* stream, bool loadMeta) override;
bool onParamCreated(Parameter* p) override;
@@ -829,7 +804,6 @@ class AnimGraphExecutor : public VisjectExecutor
{
friend AnimGraphNode;
private:
-
AnimGraph& _graph;
RootMotionMode _rootMotionMode = RootMotionMode::NoExtraction;
int32 _skeletonNodesCount = 0;
@@ -838,7 +812,6 @@ private:
static ThreadLocal Context;
public:
-
///
/// Initializes the managed runtime calls.
///
@@ -851,7 +824,6 @@ public:
explicit AnimGraphExecutor(AnimGraph& graph);
public:
-
///
/// Updates the graph animation.
///
@@ -891,7 +863,6 @@ public:
void ResetBuckets(AnimGraphContext& context, AnimGraphBase* graph);
private:
-
Value eatBox(Node* caller, Box* box) override;
Graph* GetCurrentGraph() const override;
diff --git a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp
index 1db945a7c..a06833ba1 100644
--- a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp
+++ b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp
@@ -516,7 +516,7 @@ void AnimGraphExecutor::ProcessGroupParameters(Box* box, Node* node, Value& valu
auto& context = Context.Get();
switch (node->TypeID)
{
- // Get
+ // Get
case 1:
{
// Get parameter
@@ -628,7 +628,7 @@ void AnimGraphExecutor::ProcessGroupTools(Box* box, Node* nodeBase, Value& value
auto node = (AnimGraphNode*)nodeBase;
switch (node->TypeID)
{
- // Time
+ // Time
case 5:
{
auto& bucket = context.Data->State[node->BucketIndex].Animation;
@@ -655,11 +655,11 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
auto node = (AnimGraphNode*)nodeBase;
switch (node->TypeID)
{
- // Animation Output
+ // Animation Output
case 1:
value = tryGetValue(box, Value::Null);
break;
- // Animation
+ // Animation
case 2:
{
const auto anim = node->Assets[0].As();
@@ -670,7 +670,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
switch (box->ID)
{
- // Animation
+ // Animation
case 0:
{
const float length = anim ? anim->GetLength() : 0.0f;
@@ -690,21 +690,21 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Normalized Time
+ // Normalized Time
case 1:
value = startTimePos + bucket.TimePosition;
if (anim && anim->IsLoaded())
value.AsFloat /= anim->GetLength();
break;
- // Time
+ // Time
case 2:
value = startTimePos + bucket.TimePosition;
break;
- // Length
+ // Length
case 3:
value = anim ? anim->GetLength() : 0.0f;
break;
- // Is Playing
+ // Is Playing
case 4:
// If anim was updated during this or a previous frame
value = bucket.LastUpdateFrame >= context.CurrentFrameIndex - 1;
@@ -712,7 +712,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
}
break;
}
- // Transform Bone (local/model space)
+ // Transform Bone (local/model space)
case 3:
case 4:
{
@@ -762,7 +762,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // Local To Model
+ // Local To Model
case 5:
{
// [Deprecated on 15.05.2020, expires on 15.05.2021]
@@ -794,7 +794,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = dst;*/
break;
}
- // Model To Local
+ // Model To Local
case 6:
{
// [Deprecated on 15.05.2020, expires on 15.05.2021]
@@ -833,7 +833,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = dst;*/
break;
}
- // Copy Bone
+ // Copy Bone
case 7:
{
// [Deprecated on 13.05.2020, expires on 13.05.2021]
@@ -885,7 +885,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // Get Bone Transform
+ // Get Bone Transform
case 8:
{
// [Deprecated on 13.05.2020, expires on 13.05.2021]
@@ -899,7 +899,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = Variant(Transform::Identity);
break;
}
- // Blend
+ // Blend
case 9:
{
const float alpha = Math::Saturate((float)tryGetValue(node->GetBox(3), node->Values[0]));
@@ -909,12 +909,12 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
{
value = tryGetValue(node->GetBox(1), Value::Null);
}
- // Only B
+ // Only B
else if (Math::NearEqual(alpha, 1.0f, ANIM_GRAPH_BLEND_THRESHOLD))
{
value = tryGetValue(node->GetBox(2), Value::Null);
}
- // Blend A and B
+ // Blend A and B
else
{
const auto valueA = tryGetValue(node->GetBox(1), Value::Null);
@@ -938,7 +938,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Blend Additive
+ // Blend Additive
case 10:
{
const float alpha = Math::Saturate((float)tryGetValue(node->GetBox(3), node->Values[0]));
@@ -948,7 +948,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
{
value = tryGetValue(node->GetBox(1), Value::Null);
}
- // Blend A and B
+ // Blend A and B
else
{
const auto valueA = tryGetValue(node->GetBox(1), Value::Null);
@@ -985,7 +985,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Blend with Mask
+ // Blend with Mask
case 11:
{
const float alpha = Math::Saturate((float)tryGetValue(node->GetBox(3), node->Values[0]));
@@ -996,7 +996,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
{
value = tryGetValue(node->GetBox(1), Value::Null);
}
- // Blend A and B with mask
+ // Blend A and B with mask
else
{
auto valueA = tryGetValue(node->GetBox(1), Value::Null);
@@ -1033,7 +1033,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Multi Blend 1D
+ // Multi Blend 1D
case 12:
{
ASSERT(box->ID == 0);
@@ -1122,7 +1122,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Multi Blend 2D
+ // Multi Blend 2D
case 13:
{
ASSERT(box->ID == 0);
@@ -1304,7 +1304,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Blend Pose
+ // Blend Pose
case 14:
{
ASSERT(box->ID == 0);
@@ -1353,7 +1353,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Get Root Motion
+ // Get Root Motion
case 15:
{
auto pose = tryGetValue(node->GetBox(2), Value::Null);
@@ -1384,7 +1384,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
}
break;
}
- // Set Root Motion
+ // Set Root Motion
case 16:
{
auto pose = tryGetValue(node->GetBox(1), Value::Null);
@@ -1402,7 +1402,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // Add Root Motion
+ // Add Root Motion
case 17:
{
auto pose = tryGetValue(node->GetBox(1), Value::Null);
@@ -1420,7 +1420,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // State Machine
+ // State Machine
case 18:
{
const int32 maxTransitionsPerUpdate = node->Values[2].AsInt;
@@ -1581,51 +1581,51 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
break;
}
- // Entry
+ // Entry
case 19:
{
// Not used
CRASH;
break;
}
- // State
+ // State
case 20:
{
// Not used
CRASH;
break;
}
- // State Output
+ // State Output
case 21:
value = box->HasConnection() ? eatBox(nodeBase, box->FirstConnection()) : Value::Null;
break;
- // Rule Output
+ // Rule Output
case 22:
value = box->HasConnection() ? eatBox(nodeBase, box->FirstConnection()) : Value::Null;
break;
- // Transition Source State Anim
+ // Transition Source State Anim
case 23:
{
const AnimGraphTransitionData& transitionsData = context.TransitionData;
switch (box->ID)
{
- // Length
+ // Length
case 0:
value = transitionsData.Length;
break;
- // Time
+ // Time
case 1:
value = transitionsData.Position;
break;
- // Normalized Time
+ // Normalized Time
case 2:
value = transitionsData.Position / transitionsData.Length;
break;
- // Remaining Time
+ // Remaining Time
case 3:
value = transitionsData.Length - transitionsData.Position;
break;
- // Remaining Normalized Time
+ // Remaining Normalized Time
case 4:
value = 1.0f - (transitionsData.Position / transitionsData.Length);
break;
@@ -1634,7 +1634,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
}
break;
}
- // Animation Graph Function
+ // Animation Graph Function
case 24:
{
// Load function graph
@@ -1683,7 +1683,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
context.GraphStack.Pop();
break;
}
- // Transform Bone (local/model space)
+ // Transform Bone (local/model space)
case 25:
case 26:
{
@@ -1741,7 +1741,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // Copy Node
+ // Copy Node
case 27:
{
// Get input
@@ -1790,7 +1790,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // Get Node Transform (model space)
+ // Get Node Transform (model space)
case 28:
{
// Get input
@@ -1802,7 +1802,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = Variant(Transform::Identity);
break;
}
- // Aim IK
+ // Aim IK
case 29:
{
// Get input
@@ -1847,7 +1847,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = nodes;
break;
}
- // Get Node Transform (local space)
+ // Get Node Transform (local space)
case 30:
{
// Get input
@@ -1859,7 +1859,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
value = Variant(Transform::Identity);
break;
}
- // Two Bone IK
+ // Two Bone IK
case 31:
{
// Get input
@@ -2023,7 +2023,7 @@ void AnimGraphExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value& va
return;
switch (node->TypeID)
{
- // Function Input
+ // Function Input
case 1:
{
// Find the function call
diff --git a/Source/Engine/Animations/InverseKinematics.h b/Source/Engine/Animations/InverseKinematics.h
index f3db4cd9f..b0a4c7be3 100644
--- a/Source/Engine/Animations/InverseKinematics.h
+++ b/Source/Engine/Animations/InverseKinematics.h
@@ -12,7 +12,6 @@
class FLAXENGINE_API InverseKinematics
{
public:
-
///
/// Rotates a node so it aims at a target. Solves the transformation (rotation) that needs to be applied to the node such that a provided forward vector (in node local space) aims at the target position (in skeleton model space).
///
diff --git a/Source/Engine/Animations/SceneAnimations/SceneAnimation.h b/Source/Engine/Animations/SceneAnimations/SceneAnimation.h
index a4511804f..c27c2786b 100644
--- a/Source/Engine/Animations/SceneAnimations/SceneAnimation.h
+++ b/Source/Engine/Animations/SceneAnimations/SceneAnimation.h
@@ -13,9 +13,8 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API SceneAnimation final : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(SceneAnimation, 1);
+ DECLARE_BINARY_ASSET_HEADER(SceneAnimation, 1);
public:
-
///
/// The animation timeline track data.
///
@@ -412,12 +411,10 @@ public:
};
private:
-
BytesContainer _data;
MemoryWriteStream _runtimeData;
public:
-
///
/// The frames amount per second of the timeline animation.
///
@@ -439,14 +436,12 @@ public:
int32 TrackStatesCount;
public:
-
///
/// Gets the animation duration (in seconds).
///
API_PROPERTY() float GetDuration() const;
public:
-
///
/// Gets the serialized timeline data.
///
@@ -466,14 +461,12 @@ public:
#endif
public:
-
// [BinaryAsset]
#if USE_EDITOR
void GetReferences(Array& output) const override;
#endif
protected:
-
// [SceneAnimationBase]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Animations/SceneAnimations/SceneAnimationPlayer.h b/Source/Engine/Animations/SceneAnimations/SceneAnimationPlayer.h
index cab2c16ad..4e0fcaa40 100644
--- a/Source/Engine/Animations/SceneAnimations/SceneAnimationPlayer.h
+++ b/Source/Engine/Animations/SceneAnimations/SceneAnimationPlayer.h
@@ -13,7 +13,7 @@
///
API_CLASS() class FLAXENGINE_API SceneAnimationPlayer : public Actor, public IPostFxSettingsProvider
{
-DECLARE_SCENE_OBJECT(SceneAnimationPlayer);
+ DECLARE_SCENE_OBJECT(SceneAnimationPlayer);
///
/// Describes the scene animation updates frequency.
@@ -32,7 +32,6 @@ DECLARE_SCENE_OBJECT(SceneAnimationPlayer);
};
private:
-
enum class PlayState
{
Stopped,
@@ -74,7 +73,6 @@ private:
} _postFxSettings;
public:
-
///
/// The scene animation to play.
///
@@ -136,7 +134,6 @@ public:
bool UsePrefabObjects = false;
public:
-
///
/// Gets the value that determines whether the scene animation is playing.
///
@@ -209,7 +206,6 @@ public:
API_FUNCTION() void MapTrack(const StringView& from, const Guid& to);
private:
-
void Restore(SceneAnimation* anim, int32 stateIndexOffset);
bool TickPropertyTrack(int32 trackIndex, int32 stateIndexOffset, SceneAnimation* anim, float time, const SceneAnimation::Track& track, TrackInstance& state, void* target);
typedef Array> CallStack;
@@ -219,7 +215,6 @@ private:
void ResetState();
public:
-
// [Actor]
bool HasContentLoaded() const override;
void Serialize(SerializeStream& stream, const void* otherObj) override;
@@ -237,7 +232,6 @@ public:
void Blend(PostProcessSettings& other, float weight) override;
protected:
-
// [Actor]
void BeginPlay(SceneBeginData* data) override;
void EndPlay() override;
diff --git a/Source/Engine/Content/Asset.h b/Source/Engine/Content/Asset.h
index 32a3dcf25..94fd1ed31 100644
--- a/Source/Engine/Content/Asset.h
+++ b/Source/Engine/Content/Asset.h
@@ -23,19 +23,17 @@
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API Asset : public ManagedScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Asset);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Asset);
friend Content;
friend LoadAssetTask;
friend class ContentService;
public:
-
///
/// The asset loading result.
///
DECLARE_ENUM_7(LoadResult, Ok, Failed, MissingDataChunk, CannotLoadData, CannotLoadStorage, CannotLoadInitData, InvalidData);
protected:
-
volatile int64 _refCount;
ContentLoadTask* _loadingTask;
@@ -45,7 +43,6 @@ protected:
int8 _isVirtual : 1; // Indicates that asset is pure virtual (generated or temporary, has no storage so won't be saved)
public:
-
///
/// Initializes a new instance of the class.
///
@@ -54,7 +51,6 @@ public:
explicit Asset(const SpawnParams& params, const AssetInfo* info);
public:
-
typedef Delegate EventType;
///
@@ -78,7 +74,6 @@ public:
CriticalSection Locker;
public:
-
///
/// Gets asset's reference count. Asset will be automatically unloaded when this reaches zero.
///
@@ -101,7 +96,6 @@ public:
}
public:
-
///
/// Gets the path to the asset storage file. In Editor it reflects the actual file, in cooked Game, it fakes the Editor path to be informative for developers.
///
@@ -143,7 +137,6 @@ public:
#endif
public:
-
///
/// Reloads the asset.
///
@@ -195,7 +188,6 @@ public:
void DeleteManaged();
protected:
-
///
/// Creates the loading tasks sequence (allows to inject custom tasks to asset loading logic).
///
@@ -225,7 +217,6 @@ protected:
virtual void unload(bool isReloading) = 0;
protected:
-
virtual bool IsInternalType() const;
bool onLoad(LoadAssetTask* task);
@@ -237,7 +228,6 @@ protected:
#endif
public:
-
// [ManagedScriptingObject]
String ToString() const override;
void OnDeleteObject() override;
diff --git a/Source/Engine/Content/AssetInfo.h b/Source/Engine/Content/AssetInfo.h
index e60a9b968..7cb44b0f8 100644
--- a/Source/Engine/Content/AssetInfo.h
+++ b/Source/Engine/Content/AssetInfo.h
@@ -10,7 +10,7 @@
///
API_STRUCT() struct AssetInfo
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(AssetInfo);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(AssetInfo);
///
/// Unique ID.
@@ -28,7 +28,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(AssetInfo);
API_FIELD() String Path;
public:
-
///
/// Initializes a new instance of the struct.
///
@@ -51,7 +50,6 @@ public:
}
public:
-
///
/// Gets the string.
///
diff --git a/Source/Engine/Content/AssetReference.h b/Source/Engine/Content/AssetReference.h
index 1963b6b4f..82ef5adce 100644
--- a/Source/Engine/Content/AssetReference.h
+++ b/Source/Engine/Content/AssetReference.h
@@ -10,15 +10,12 @@
class FLAXENGINE_API AssetReferenceBase
{
public:
-
typedef Delegate<> EventType;
protected:
-
Asset* _asset = nullptr;
public:
-
///
/// The asset loaded event (fired when asset gets loaded or is already loaded after change).
///
@@ -48,7 +45,6 @@ public:
~AssetReferenceBase();
public:
-
///
/// Gets the asset ID or Guid::Empty if not set.
///
@@ -71,7 +67,6 @@ public:
String ToString() const;
protected:
-
void OnSet(Asset* asset);
void OnLoaded(Asset* asset);
void OnUnloaded(Asset* asset);
@@ -84,12 +79,10 @@ template
API_CLASS(InBuild) class AssetReference : public AssetReferenceBase
{
public:
-
typedef T AssetType;
typedef AssetReference Type;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -139,7 +132,6 @@ public:
}
public:
-
FORCE_INLINE AssetReference& operator=(const AssetReference& other)
{
OnSet(other.Get());
@@ -220,7 +212,6 @@ public:
}
public:
-
///
/// Sets the asset reference.
///
diff --git a/Source/Engine/Content/Assets/Animation.h b/Source/Engine/Content/Assets/Animation.h
index b5c815b04..3d30a7a7f 100644
--- a/Source/Engine/Content/Assets/Animation.h
+++ b/Source/Engine/Content/Assets/Animation.h
@@ -14,14 +14,14 @@ class AnimEvent;
///
API_CLASS(NoSpawn) class FLAXENGINE_API Animation : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(Animation, 1);
+ DECLARE_BINARY_ASSET_HEADER(Animation, 1);
///
/// Contains basic information about the animation asset contents.
///
API_STRUCT() struct FLAXENGINE_API InfoData
{
- DECLARE_SCRIPTING_TYPE_NO_SPAWN(InfoData);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(InfoData);
///
/// Length of the animation in seconds.
@@ -62,14 +62,12 @@ DECLARE_BINARY_ASSET_HEADER(Animation, 1);
};
private:
-
#if USE_EDITOR
bool _registeredForScriptingReload = false;
void OnScriptsReloadStart();
#endif
public:
-
///
/// The animation data.
///
@@ -92,7 +90,6 @@ public:
Dictionary MappingCache;
public:
-
///
/// Gets the length of the animation (in seconds).
///
@@ -160,16 +157,13 @@ public:
#endif
private:
-
void OnSkinnedModelUnloaded(Asset* obj);
public:
-
// [BinaryAsset]
void OnScriptingDispose() override;
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/AnimationGraph.h b/Source/Engine/Content/Assets/AnimationGraph.h
index 58f94a7c7..266cf4855 100644
--- a/Source/Engine/Content/Assets/AnimationGraph.h
+++ b/Source/Engine/Content/Assets/AnimationGraph.h
@@ -10,9 +10,8 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API AnimationGraph : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(AnimationGraph, 1);
+ DECLARE_BINARY_ASSET_HEADER(AnimationGraph, 1);
public:
-
///
/// The animation graph.
///
@@ -24,7 +23,6 @@ public:
AnimGraphExecutor GraphExecutor;
public:
-
///
/// Gets the base model asset used for the animation preview and the skeleton layout source.
///
@@ -58,20 +56,17 @@ public:
API_FUNCTION() bool SaveSurface(BytesContainer& data);
private:
-
void FindDependencies(AnimGraphBase* graph);
#endif
public:
-
// [BinaryAsset]
#if USE_EDITOR
void GetReferences(Array& output) const override;
#endif
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/AnimationGraphFunction.cpp b/Source/Engine/Content/Assets/AnimationGraphFunction.cpp
index 013ea693d..c0383a32a 100644
--- a/Source/Engine/Content/Assets/AnimationGraphFunction.cpp
+++ b/Source/Engine/Content/Assets/AnimationGraphFunction.cpp
@@ -147,7 +147,6 @@ void AnimationGraphFunction::ProcessGraphForSignature(AnimGraphBase* graph, bool
p.Type = GetGraphFunctionTypeName_Deprecated(node.Values[0]);
#endif
p.Name = name;
-
}
}
else if (node.Type == GRAPH_NODE_MAKE_TYPE(16, 2)) // Function Output
diff --git a/Source/Engine/Content/Assets/AnimationGraphFunction.h b/Source/Engine/Content/Assets/AnimationGraphFunction.h
index 4b32a4af3..b9a73a8b6 100644
--- a/Source/Engine/Content/Assets/AnimationGraphFunction.h
+++ b/Source/Engine/Content/Assets/AnimationGraphFunction.h
@@ -10,9 +10,8 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API AnimationGraphFunction : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(AnimationGraphFunction, 1);
+ DECLARE_BINARY_ASSET_HEADER(AnimationGraphFunction, 1);
public:
-
///
/// The loaded anim graph function graph data (serialized anim graph).
///
@@ -59,11 +58,9 @@ public:
#endif
private:
-
void ProcessGraphForSignature(AnimGraphBase* graph, bool canUseOutputs);
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/CubeTexture.h b/Source/Engine/Content/Assets/CubeTexture.h
index 92ed9b73c..18aa10470 100644
--- a/Source/Engine/Content/Assets/CubeTexture.h
+++ b/Source/Engine/Content/Assets/CubeTexture.h
@@ -9,5 +9,5 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API CubeTexture : public TextureBase
{
-DECLARE_BINARY_ASSET_HEADER(CubeTexture, TexturesSerializedVersion);
+ DECLARE_BINARY_ASSET_HEADER(CubeTexture, TexturesSerializedVersion);
};
diff --git a/Source/Engine/Content/Assets/IESProfile.h b/Source/Engine/Content/Assets/IESProfile.h
index 8b6c4f9e1..f740966a8 100644
--- a/Source/Engine/Content/Assets/IESProfile.h
+++ b/Source/Engine/Content/Assets/IESProfile.h
@@ -9,10 +9,9 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API IESProfile : public TextureBase
{
-DECLARE_BINARY_ASSET_HEADER(IESProfile, TexturesSerializedVersion);
+ DECLARE_BINARY_ASSET_HEADER(IESProfile, TexturesSerializedVersion);
public:
-
struct CustomDataLayout
{
float Brightness;
@@ -20,7 +19,6 @@ public:
};
public:
-
///
/// The light brightness in Lumens, imported from IES profile.
///
@@ -32,7 +30,6 @@ public:
API_FIELD() float TextureMultiplier;
protected:
-
// [BinaryAsset]
bool init(AssetInitData& initData) override;
};
diff --git a/Source/Engine/Content/Assets/Material.h b/Source/Engine/Content/Assets/Material.h
index 676680968..54fa0251f 100644
--- a/Source/Engine/Content/Assets/Material.h
+++ b/Source/Engine/Content/Assets/Material.h
@@ -12,13 +12,11 @@ class MaterialShader;
///
API_CLASS(NoSpawn) class FLAXENGINE_API Material : public ShaderAssetTypeBase
{
-DECLARE_BINARY_ASSET_HEADER(Material, ShadersSerializedVersion);
+ DECLARE_BINARY_ASSET_HEADER(Material, ShadersSerializedVersion);
private:
-
MaterialShader* _materialShader = nullptr;
public:
-
///
/// Tries to load surface graph from the asset.
///
@@ -39,7 +37,6 @@ public:
#endif
public:
-
// [MaterialBase]
bool IsMaterialInstance() const override;
@@ -58,7 +55,6 @@ public:
#endif
protected:
-
// [MaterialBase]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/MaterialBase.h b/Source/Engine/Content/Assets/MaterialBase.h
index c93fe4337..26f691571 100644
--- a/Source/Engine/Content/Assets/MaterialBase.h
+++ b/Source/Engine/Content/Assets/MaterialBase.h
@@ -12,9 +12,8 @@
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API MaterialBase : public BinaryAsset, public IMaterial
{
-DECLARE_ASSET_HEADER(MaterialBase);
+ DECLARE_ASSET_HEADER(MaterialBase);
public:
-
///
/// The material parameters collection.
///
@@ -32,7 +31,6 @@ public:
virtual bool IsMaterialInstance() const = 0;
public:
-
///
/// Gets the material parameters collection.
///
@@ -78,7 +76,6 @@ public:
API_FUNCTION() MaterialInstance* CreateVirtualInstance();
public:
-
// [BinaryAsset]
#if USE_EDITOR
void GetReferences(Array& output) const override
diff --git a/Source/Engine/Content/Assets/MaterialFunction.h b/Source/Engine/Content/Assets/MaterialFunction.h
index 2fce099b4..e53d2cd3d 100644
--- a/Source/Engine/Content/Assets/MaterialFunction.h
+++ b/Source/Engine/Content/Assets/MaterialFunction.h
@@ -10,9 +10,8 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API MaterialFunction : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(MaterialFunction, 1);
+ DECLARE_BINARY_ASSET_HEADER(MaterialFunction, 1);
public:
-
#if COMPILE_WITH_MATERIAL_GRAPH
///
@@ -60,7 +59,6 @@ public:
#endif
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/MaterialInstance.h b/Source/Engine/Content/Assets/MaterialInstance.h
index d5df025be..3b06c6f75 100644
--- a/Source/Engine/Content/Assets/MaterialInstance.h
+++ b/Source/Engine/Content/Assets/MaterialInstance.h
@@ -9,13 +9,11 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API MaterialInstance : public MaterialBase
{
-DECLARE_BINARY_ASSET_HEADER(MaterialInstance, 4);
+ DECLARE_BINARY_ASSET_HEADER(MaterialInstance, 4);
private:
-
MaterialBase* _baseMaterial = nullptr;
public:
-
///
/// Gets the base material. If value gets changed parameters collection is restored to the default values of the new material.
///
@@ -43,14 +41,12 @@ public:
#endif
private:
-
void OnBaseSet();
void OnBaseUnset();
void OnBaseUnloaded(Asset* p);
void OnBaseParamsChanged();
public:
-
// [MaterialBase]
bool IsMaterialInstance() const override;
#if USE_EDITOR
@@ -67,7 +63,6 @@ public:
void Bind(BindParameters& params) override;
protected:
-
// [MaterialBase]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/Model.h b/Source/Engine/Content/Assets/Model.h
index cdb6d970d..9156582d2 100644
--- a/Source/Engine/Content/Assets/Model.h
+++ b/Source/Engine/Content/Assets/Model.h
@@ -13,16 +13,14 @@ class StreamModelLODTask;
///
API_CLASS(NoSpawn) class FLAXENGINE_API Model : public ModelBase
{
-DECLARE_BINARY_ASSET_HEADER(Model, 25);
+ DECLARE_BINARY_ASSET_HEADER(Model, 25);
friend Mesh;
friend StreamModelLODTask;
private:
-
int32 _loadedLODs = 0;
StreamModelLODTask* _streamingTask = nullptr;
public:
-
///
/// Model level of details. The first entry is the highest quality LOD0 followed by more optimized versions.
///
@@ -34,14 +32,12 @@ public:
API_FIELD(ReadOnly) SDFData SDF;
public:
-
///
/// Finalizes an instance of the class.
///
~Model();
public:
-
///
/// Gets a value indicating whether this instance is initialized.
///
@@ -103,7 +99,6 @@ public:
}
public:
-
///
/// Requests the LOD data asynchronously (creates task that will gather chunk data or null if already here).
///
@@ -127,7 +122,6 @@ public:
}
public:
-
///
/// Determines if there is an intersection between the Model and a Ray in given world using given instance.
///
@@ -156,7 +150,6 @@ public:
API_FUNCTION() BoundingBox GetBox(int32 lodIndex = 0) const;
public:
-
///
/// Draws the meshes. Binds vertex and index buffers and invokes the draw calls.
///
@@ -185,7 +178,6 @@ public:
void Draw(const RenderContext& renderContext, const Mesh::DrawInfo& info);
public:
-
///
/// Setups the model LODs collection including meshes creation.
///
@@ -205,7 +197,7 @@ public:
API_FUNCTION() bool Save(bool withMeshDataFromGpu = false, const StringView& path = StringView::Empty);
#endif
-
+
///
/// Generates the Sign Distant Field for this model.
///
@@ -223,7 +215,6 @@ public:
API_FUNCTION() void SetSDF(const SDFData& sdf);
private:
-
///
/// Initializes this model to an empty collection of LODs with meshes.
///
@@ -232,7 +223,6 @@ private:
bool Init(const Span& meshesCountPerLod);
public:
-
// [ModelBase]
void SetupMaterialSlots(int32 slotsCount) override;
int32 GetLODsCount() const override;
@@ -251,7 +241,6 @@ public:
Task* CreateStreamingTask(int32 residency) override;
protected:
-
// [ModelBase]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/RawDataAsset.h b/Source/Engine/Content/Assets/RawDataAsset.h
index e81ac6b21..2558426e9 100644
--- a/Source/Engine/Content/Assets/RawDataAsset.h
+++ b/Source/Engine/Content/Assets/RawDataAsset.h
@@ -9,16 +9,14 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API RawDataAsset : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(RawDataAsset, 1);
+ DECLARE_BINARY_ASSET_HEADER(RawDataAsset, 1);
public:
-
///
/// The bytes array stored in the asset.
///
API_FIELD() Array Data;
public:
-
#if USE_EDITOR
///
@@ -31,7 +29,6 @@ public:
#endif
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/Shader.h b/Source/Engine/Content/Assets/Shader.h
index e2faeff3e..ce1a47076 100644
--- a/Source/Engine/Content/Assets/Shader.h
+++ b/Source/Engine/Content/Assets/Shader.h
@@ -12,20 +12,17 @@ class GPUShader;
///
API_CLASS(NoSpawn) class FLAXENGINE_API Shader : public ShaderAssetTypeBase
{
-DECLARE_BINARY_ASSET_HEADER(Shader, ShadersSerializedVersion);
+ DECLARE_BINARY_ASSET_HEADER(Shader, ShadersSerializedVersion);
private:
-
GPUShader* _shader;
public:
-
///
/// Finalizes an instance of the class.
///
~Shader();
public:
-
///
/// The GPU shader object (not null).
///
@@ -40,7 +37,6 @@ public:
}
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/SkeletonMask.h b/Source/Engine/Content/Assets/SkeletonMask.h
index 99e6b48ee..c41b8eeda 100644
--- a/Source/Engine/Content/Assets/SkeletonMask.h
+++ b/Source/Engine/Content/Assets/SkeletonMask.h
@@ -14,14 +14,12 @@ class MemoryWriteStream;
///
API_CLASS(NoSpawn) class FLAXENGINE_API SkeletonMask : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(SkeletonMask, 2);
+ DECLARE_BINARY_ASSET_HEADER(SkeletonMask, 2);
private:
-
Array _maskedNodes;
BitArray<> _mask;
public:
-
///
/// The referenced skinned model skeleton that defines the masked nodes hierarchy.
///
@@ -47,7 +45,6 @@ public:
}
public:
-
///
/// Gets the per-skeleton-node boolean mask (read-only).
///
@@ -66,11 +63,9 @@ public:
#endif
private:
-
void OnSkeletonUnload();
public:
-
// [BinaryAsset]
#if USE_EDITOR
void GetReferences(Array& output) const override
@@ -83,7 +78,6 @@ public:
#endif
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/SkinnedModel.h b/Source/Engine/Content/Assets/SkinnedModel.h
index fb7b8a8fb..fd55ea4ed 100644
--- a/Source/Engine/Content/Assets/SkinnedModel.h
+++ b/Source/Engine/Content/Assets/SkinnedModel.h
@@ -14,16 +14,14 @@ class StreamSkinnedModelLODTask;
///
API_CLASS(NoSpawn) class FLAXENGINE_API SkinnedModel : public ModelBase
{
-DECLARE_BINARY_ASSET_HEADER(SkinnedModel, 4);
+ DECLARE_BINARY_ASSET_HEADER(SkinnedModel, 4);
friend SkinnedMesh;
friend StreamSkinnedModelLODTask;
private:
-
int32 _loadedLODs = 0;
StreamSkinnedModelLODTask* _streamingTask = nullptr;
public:
-
///
/// Model level of details. The first entry is the highest quality LOD0 followed by more optimized versions.
///
@@ -35,14 +33,12 @@ public:
SkeletonData Skeleton;
public:
-
///
/// Finalizes an instance of the class.
///
~SkinnedModel();
public:
-
///
/// Gets a value indicating whether this instance is initialized.
///
@@ -154,7 +150,6 @@ public:
API_PROPERTY() Array GetBlendShapes();
public:
-
///
/// Requests the LOD data asynchronously (creates task that will gather chunk data or null if already here).
///
@@ -170,7 +165,6 @@ public:
void GetLODData(int32 lodIndex, BytesContainer& data) const;
public:
-
///
/// Determines if there is an intersection between the SkinnedModel and a Ray in given world using given instance.
///
@@ -199,7 +193,6 @@ public:
API_FUNCTION() BoundingBox GetBox(int32 lodIndex = 0) const;
public:
-
///
/// Draws the meshes. Binds vertex and index buffers and invokes the draw calls.
///
@@ -218,7 +211,6 @@ public:
void Draw(RenderContext& renderContext, const SkinnedMesh::DrawInfo& info);
public:
-
///
/// Setups the model LODs collection including meshes creation.
///
@@ -256,7 +248,6 @@ public:
#endif
private:
-
///
/// Initializes this skinned model to an empty collection of meshes. Ensure to init SkeletonData manually after the call.
///
@@ -265,7 +256,6 @@ private:
bool Init(const Span& meshesCountPerLod);
public:
-
// [ModelBase]
void SetupMaterialSlots(int32 slotsCount) override;
int32 GetLODsCount() const override;
@@ -284,7 +274,6 @@ public:
Task* CreateStreamingTask(int32 residency) override;
protected:
-
// [ModelBase]
LoadResult load() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Assets/Texture.h b/Source/Engine/Content/Assets/Texture.h
index ccd5e98ab..78b6414e8 100644
--- a/Source/Engine/Content/Assets/Texture.h
+++ b/Source/Engine/Content/Assets/Texture.h
@@ -9,7 +9,7 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API Texture : public TextureBase
{
-DECLARE_BINARY_ASSET_HEADER(Texture, TexturesSerializedVersion);
+ DECLARE_BINARY_ASSET_HEADER(Texture, TexturesSerializedVersion);
///
/// Gets the texture format type.
@@ -22,7 +22,6 @@ DECLARE_BINARY_ASSET_HEADER(Texture, TexturesSerializedVersion);
API_PROPERTY() bool IsNormalMap() const;
public:
-
#if USE_EDITOR
///
diff --git a/Source/Engine/Content/Assets/VisualScript.cpp b/Source/Engine/Content/Assets/VisualScript.cpp
index d710e7b64..eba6878da 100644
--- a/Source/Engine/Content/Assets/VisualScript.cpp
+++ b/Source/Engine/Content/Assets/VisualScript.cpp
@@ -54,15 +54,15 @@ bool VisualScriptGraph::onNodeLoaded(Node* n)
{
switch (n->GroupID)
{
- // Function
+ // Function
case 16:
switch (n->TypeID)
{
- // Invoke Method
+ // Invoke Method
case 4:
n->Data.InvokeMethod.Method = nullptr;
break;
- // Get/Set Field
+ // Get/Set Field
case 7:
case 8:
n->Data.GetSetField.Field = nullptr;
@@ -176,7 +176,7 @@ void VisualScriptExecutor::ProcessGroupParameters(Box* box, Node* node, Value& v
{
switch (node->TypeID)
{
- // Get
+ // Get
case 3:
{
int32 paramIndex;
@@ -200,7 +200,7 @@ void VisualScriptExecutor::ProcessGroupParameters(Box* box, Node* node, Value& v
}
break;
}
- // Set
+ // Set
case 4:
{
int32 paramIndex;
@@ -235,11 +235,11 @@ void VisualScriptExecutor::ProcessGroupTools(Box* box, Node* node, Value& value)
{
switch (node->TypeID)
{
- // This Instance
+ // This Instance
case 19:
value = ThreadStacks.Get().Stack->Instance;
break;
- // Cast
+ // Cast
case 25:
{
if (box->ID == 0)
@@ -297,7 +297,7 @@ void VisualScriptExecutor::ProcessGroupTools(Box* box, Node* node, Value& value)
}
break;
}
- // Cast Value
+ // Cast Value
case 26:
{
if (box->ID == 0)
@@ -375,7 +375,7 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
{
switch (node->TypeID)
{
- // Method Override
+ // Method Override
case 3:
{
if (boxBase->ID == 0)
@@ -392,7 +392,7 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
}
break;
}
- // Invoke Method
+ // Invoke Method
case 4:
{
// Call Impulse or Pure Method
@@ -604,14 +604,14 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
}
break;
}
- // Return
+ // Return
case 5:
{
auto& scope = ThreadStacks.Get().Stack->Scope;
scope->FunctionReturn = tryGetValue(node->GetBox(1), Value::Zero);
break;
}
- // Function
+ // Function
case 6:
{
if (boxBase->ID == 0)
@@ -630,7 +630,7 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
}
break;
}
- // Get Field
+ // Get Field
case 7:
{
auto& cache = node->Data.GetSetField;
@@ -716,7 +716,7 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
}
break;
}
- // Get Field
+ // Get Field
case 8:
{
auto& cache = node->Data.GetSetField;
@@ -809,7 +809,7 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
eatBox(node, returnedImpulse->FirstConnection());
break;
}
- // Bind/Unbind
+ // Bind/Unbind
case 9:
case 10:
{
@@ -937,7 +937,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
{
switch (node->TypeID)
{
- // If
+ // If
case 1:
{
const bool condition = (bool)tryGetValue(node->GetBox(1), Value::Zero);
@@ -946,7 +946,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
eatBox(node, boxBase->FirstConnection());
break;
}
- // For Loop
+ // For Loop
case 2:
{
const auto scope = ThreadStacks.Get().Stack->Scope;
@@ -959,7 +959,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
switch (boxBase->ID)
{
- // Loop
+ // Loop
case 0:
{
if (iteratorIndex == scope->ReturnedValues.Count())
@@ -980,13 +980,13 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
eatBox(node, boxBase->FirstConnection());
break;
}
- // Break
+ // Break
case 3:
// Reset loop iterator
if (iteratorIndex != scope->ReturnedValues.Count())
scope->ReturnedValues[iteratorIndex].Value.AsInt = MAX_int32 - 1;
break;
- // Index
+ // Index
case 5:
if (iteratorIndex != scope->ReturnedValues.Count())
value = scope->ReturnedValues[iteratorIndex].Value;
@@ -994,7 +994,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
break;
}
- // While Loop
+ // While Loop
case 3:
{
const auto scope = ThreadStacks.Get().Stack->Scope;
@@ -1007,7 +1007,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
switch (boxBase->ID)
{
- // Loop
+ // Loop
case 0:
{
if (iteratorIndex == scope->ReturnedValues.Count())
@@ -1027,13 +1027,13 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
eatBox(node, boxBase->FirstConnection());
break;
}
- // Break
+ // Break
case 2:
// Reset loop iterator
if (iteratorIndex != scope->ReturnedValues.Count())
scope->ReturnedValues[iteratorIndex].Value.AsInt = -1;
break;
- // Index
+ // Index
case 4:
if (iteratorIndex != scope->ReturnedValues.Count())
value = scope->ReturnedValues[iteratorIndex].Value;
@@ -1041,7 +1041,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
break;
}
- // Sequence
+ // Sequence
case 4:
{
const int32 count = (int32)node->Values[0];
@@ -1053,7 +1053,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
break;
}
- // Branch On Enum
+ // Branch On Enum
case 5:
{
const Value v = tryGetValue(node->GetBox(1), Value::Null);
@@ -1075,7 +1075,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
break;
}
- // Delay
+ // Delay
case 6:
{
boxBase = node->GetBox(2);
@@ -1115,7 +1115,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
break;
}
- // Array For Each
+ // Array For Each
case 7:
{
const auto scope = ThreadStacks.Get().Stack->Scope;
@@ -1135,7 +1135,7 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
}
switch (boxBase->ID)
{
- // Loop
+ // Loop
case 0:
{
if (iteratorIndex == scope->ReturnedValues.Count())
@@ -1173,18 +1173,18 @@ void VisualScriptExecutor::ProcessGroupFlow(Box* boxBase, Node* node, Value& val
eatBox(node, boxBase->FirstConnection());
break;
}
- // Break
+ // Break
case 2:
// Reset loop iterator
if (iteratorIndex != scope->ReturnedValues.Count())
scope->ReturnedValues[iteratorIndex].Value.AsInt = MAX_int32 - 1;
break;
- // Item
+ // Item
case 4:
if (iteratorIndex != scope->ReturnedValues.Count() && arrayIndex != scope->ReturnedValues.Count())
value = scope->ReturnedValues[arrayIndex].Value.AsArray()[(int32)scope->ReturnedValues[iteratorIndex].Value];
break;
- // Index
+ // Index
case 5:
if (iteratorIndex != scope->ReturnedValues.Count())
value = (int32)scope->ReturnedValues[iteratorIndex].Value;
@@ -1702,13 +1702,13 @@ void VisualScriptingBinaryModule::OnScriptsReloading()
{
switch (node.Type)
{
- // Invoke Method
+ // Invoke Method
case GRAPH_NODE_MAKE_TYPE(16, 4):
{
node.Data.InvokeMethod.Method = nullptr;
break;
}
- // Get/Set Field
+ // Get/Set Field
case GRAPH_NODE_MAKE_TYPE(16, 7):
case GRAPH_NODE_MAKE_TYPE(16, 8):
{
@@ -2224,7 +2224,7 @@ String VisualScripting::GetStackTrace()
String node;
switch (frame->Node->Type)
{
- // Get/Set Parameter
+ // Get/Set Parameter
case GRAPH_NODE_MAKE_TYPE(6, 3):
case GRAPH_NODE_MAKE_TYPE(6, 4):
{
@@ -2233,19 +2233,19 @@ String VisualScripting::GetStackTrace()
node += param ? param->Name : ((Guid)frame->Node->Values[0]).ToString();
break;
}
- // Method Override
+ // Method Override
case GRAPH_NODE_MAKE_TYPE(16, 3):
node = (StringView)frame->Node->Values[0];
node += TEXT("()");
break;
- // Invoke Method
+ // Invoke Method
case GRAPH_NODE_MAKE_TYPE(16, 4):
node = (StringView)frame->Node->Values[0];
node += TEXT(".");
node += (StringView)frame->Node->Values[1];
node += TEXT("()");
break;
- // Function
+ // Function
case GRAPH_NODE_MAKE_TYPE(16, 6):
node = String(frame->Script->GetScriptTypeName());
for (int32 i = 0; i < frame->Script->_methods.Count(); i++)
diff --git a/Source/Engine/Content/Assets/VisualScript.h b/Source/Engine/Content/Assets/VisualScript.h
index e2b06be8d..064a5b31c 100644
--- a/Source/Engine/Content/Assets/VisualScript.h
+++ b/Source/Engine/Content/Assets/VisualScript.h
@@ -33,7 +33,6 @@ class VisualScriptExecutor : public VisjectExecutor
{
friend VisualScripting;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -58,12 +57,11 @@ private:
///
API_CLASS(NoSpawn, Sealed) class FLAXENGINE_API VisualScript : public BinaryAsset
{
-DECLARE_BINARY_ASSET_HEADER(VisualScript, 1);
+ DECLARE_BINARY_ASSET_HEADER(VisualScript, 1);
friend VisualScripting;
friend VisualScriptExecutor;
friend VisualScriptingBinaryModule;
public:
-
///
/// Visual Script flag types.
///
@@ -90,7 +88,7 @@ public:
///
API_STRUCT() struct Metadata
{
- DECLARE_SCRIPTING_TYPE_MINIMAL(Metadata);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(Metadata);
///
/// The base class typename.
@@ -147,7 +145,6 @@ public:
};
private:
-
Dictionary _instances;
ScriptingTypeHandle _scriptingTypeHandle;
ScriptingTypeHandle _scriptingTypeHandleCached;
@@ -160,7 +157,6 @@ private:
#endif
public:
-
///
/// The Visual Script graph.
///
@@ -172,7 +168,6 @@ public:
API_FIELD(ReadOnly) Metadata Meta;
public:
-
///
/// Gets the typename of the Visual Script. Identifies it's scripting type.
///
@@ -280,7 +275,6 @@ public:
#endif
public:
-
// [BinaryAsset]
#if USE_EDITOR
void GetReferences(Array& output) const override
@@ -293,14 +287,12 @@ public:
#endif
protected:
-
// [BinaryAsset]
LoadResult load() override;
void unload(bool isReloading) override;
AssetChunksFlag getChunksToPreload() const override;
private:
-
void CacheScriptingType();
};
@@ -312,25 +304,21 @@ class FLAXENGINE_API VisualScriptingBinaryModule : public BinaryModule
{
friend VisualScript;
private:
-
StringAnsi _name;
public:
-
///
/// Initializes a new instance of the class.
///
VisualScriptingBinaryModule();
public:
-
///
/// The visual script assets loaded into the module with exposes scripting types. Order matches the Types array.
///
Array> Scripts;
private:
-
static ScriptingObject* VisualScriptObjectSpawn(const ScriptingObjectSpawnParams& params);
#if USE_EDITOR
void OnScriptsReloading();
@@ -338,7 +326,6 @@ private:
static void OnEvent(ScriptingObject* object, Span parameters, ScriptingTypeHandle eventType, StringView eventName);
public:
-
// [BinaryModule]
const StringAnsi& GetName() const override;
bool IsLoaded() const override;
@@ -363,7 +350,6 @@ public:
class FLAXENGINE_API VisualScripting
{
public:
-
struct NodeBoxValue
{
uint32 NodeId;
diff --git a/Source/Engine/Content/AssetsContainer.h b/Source/Engine/Content/AssetsContainer.h
index def55ccdc..f33ef637a 100644
--- a/Source/Engine/Content/AssetsContainer.h
+++ b/Source/Engine/Content/AssetsContainer.h
@@ -12,7 +12,6 @@
class AssetsContainer : public Array>
{
public:
-
///
/// Loads an asset.
///
diff --git a/Source/Engine/Content/BinaryAsset.cpp b/Source/Engine/Content/BinaryAsset.cpp
index 287f5ef83..3b268f72e 100644
--- a/Source/Engine/Content/BinaryAsset.cpp
+++ b/Source/Engine/Content/BinaryAsset.cpp
@@ -459,12 +459,10 @@ const String& BinaryAsset::GetPath() const
class InitAssetTask : public ContentLoadTask
{
private:
-
WeakAssetReference _asset;
FlaxStorage::LockData _dataLock;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -477,7 +475,6 @@ public:
}
public:
-
// [ContentLoadTask]
bool HasReference(Object* obj) const override
{
@@ -485,7 +482,6 @@ public:
}
protected:
-
// [ContentLoadTask]
Result run() override
{
@@ -507,6 +503,7 @@ protected:
return Result::Ok;
}
+
void OnEnd() override
{
_dataLock.Release();
diff --git a/Source/Engine/Content/BinaryAsset.h b/Source/Engine/Content/BinaryAsset.h
index edea2e3f9..e98c645fe 100644
--- a/Source/Engine/Content/BinaryAsset.h
+++ b/Source/Engine/Content/BinaryAsset.h
@@ -21,23 +21,20 @@
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API BinaryAsset : public Asset
{
-DECLARE_ASSET_HEADER(BinaryAsset);
+ DECLARE_ASSET_HEADER(BinaryAsset);
protected:
-
AssetHeader _header;
FlaxStorageReference _storageRef; // Allow asset to have missing storage reference but only before asset is loaded or if it's virtual
bool _isSaving;
Array _dependantAssets;
public:
-
///
/// Finalizes an instance of the class.
///
~BinaryAsset();
public:
-
///
/// The asset storage container.
///
@@ -58,7 +55,6 @@ public:
#endif
public:
-
///
/// Gets the asset serialized version.
///
@@ -87,7 +83,6 @@ public:
bool InitVirtual(AssetInitData& initData);
public:
-
#if USE_EDITOR
#if COMPILE_WITH_ASSETS_IMPORTER
@@ -128,7 +123,6 @@ public:
bool HasDependenciesModified() const;
protected:
-
///
/// Called when one of the asset dependencies gets modified (it was saved or reloaded or reimported).
///
@@ -140,7 +134,6 @@ protected:
#endif
protected:
-
///
/// Initializes the specified asset.
///
@@ -161,7 +154,6 @@ protected:
}
public:
-
///
/// Gets the asset chunk.
///
@@ -293,7 +285,6 @@ public:
#endif
protected:
-
///
/// Load data from the chunks
///
@@ -301,13 +292,11 @@ protected:
virtual LoadResult load() = 0;
private:
-
#if USE_EDITOR
void OnStorageReloaded(FlaxStorage* storage, bool failed);
#endif
public:
-
// [Asset]
#if USE_EDITOR
void OnDeleteObject() override;
@@ -315,7 +304,6 @@ public:
const String& GetPath() const final override;
protected:
-
// [Asset]
ContentLoadTask* createLoadingTask() override;
LoadResult loadAsset() override;
diff --git a/Source/Engine/Content/Cache/AssetsCache.cpp b/Source/Engine/Content/Cache/AssetsCache.cpp
index 0ce183466..609c7cedc 100644
--- a/Source/Engine/Content/Cache/AssetsCache.cpp
+++ b/Source/Engine/Content/Cache/AssetsCache.cpp
@@ -578,7 +578,7 @@ bool AssetsCache::IsEntryValid(Entry& e)
return isValid;
}
}
- // Check for json resource
+ // Check for json resource
else if (JsonStorageProxy::IsValidExtension(extension))
{
// Check Json storage layer
diff --git a/Source/Engine/Content/Cache/AssetsCache.h b/Source/Engine/Content/Cache/AssetsCache.h
index 26122f6d7..4f12c0d22 100644
--- a/Source/Engine/Content/Cache/AssetsCache.h
+++ b/Source/Engine/Content/Cache/AssetsCache.h
@@ -40,7 +40,6 @@ DECLARE_ENUM_OPERATORS(AssetsCacheFlags);
class FLAXENGINE_API AssetsCache
{
public:
-
///
/// The registry entry structure.
///
@@ -75,7 +74,6 @@ public:
typedef Dictionary PathsMapping;
private:
-
bool _isDirty;
CriticalSection _locker;
Registry _registry;
@@ -83,14 +81,12 @@ private:
String _path;
public:
-
///
/// Initializes a new instance of the class.
///
AssetsCache();
public:
-
///
/// Gets amount of registered assets
///
@@ -104,7 +100,6 @@ public:
}
public:
-
///
/// Init registry
///
@@ -127,7 +122,6 @@ public:
static bool Save(const StringView& path, const Registry& entries, const PathsMapping& pathsMapping, const AssetsCacheFlags flags = AssetsCacheFlags::None);
public:
-
///
/// Finds the asset path by id. In editor it returns the actual asset path, at runtime it returns the mapped asset path.
///
diff --git a/Source/Engine/Content/Content.cpp b/Source/Engine/Content/Content.cpp
index dcbdbfa1e..c44043f79 100644
--- a/Source/Engine/Content/Content.cpp
+++ b/Source/Engine/Content/Content.cpp
@@ -66,7 +66,6 @@ bool findAsset(const Guid& id, const String& directory, Array& tmpCache,
class ContentService : public EngineService
{
public:
-
ContentService()
: EngineService(TEXT("Content"), -600)
{
@@ -294,7 +293,7 @@ bool Content::GetAssetInfo(const StringView& path, AssetInfo& info)
return Cache.FindAsset(path, info);
}
}
- // Check for json resource
+ // Check for json resource
else if (JsonStorageProxy::IsValidExtension(extension))
{
// Check Json storage layer
@@ -1081,7 +1080,7 @@ bool findAsset(const Guid& id, const String& directory, Array& tmpCache,
LOG(Error, "Cannot open file '{0}' error code: {1}", path, 0);
}
}
- // Check for json resource
+ // Check for json resource
else if (JsonStorageProxy::IsValidExtension(extension))
{
// Check Json storage layer
diff --git a/Source/Engine/Content/Content.h b/Source/Engine/Content/Content.h
index 6fe042e66..ba40f6e21 100644
--- a/Source/Engine/Content/Content.h
+++ b/Source/Engine/Content/Content.h
@@ -15,7 +15,7 @@ class AssetsCache;
// Content and assets statistics container.
API_STRUCT() struct FLAXENGINE_API ContentStats
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(ContentStats);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(ContentStats);
// Amount of asset objects in memory.
API_FIELD() int32 AssetsCount = 0;
@@ -32,11 +32,10 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(ContentStats);
///
API_CLASS(Static) class FLAXENGINE_API Content
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Content);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Content);
friend Engine;
friend Asset;
public:
-
///
/// The time between content pool updates.
///
@@ -48,7 +47,6 @@ public:
static TimeSpan AssetsUnloadInterval;
public:
-
///
/// Gets the assets registry.
///
@@ -56,7 +54,6 @@ public:
static AssetsCache* GetRegistry();
public:
-
///
/// Finds the asset info by id.
///
@@ -87,7 +84,6 @@ public:
API_FUNCTION() static Array GetAllAssetsByType(const MClass* type);
public:
-
///
/// Gets the asset factory used by the given asset type id.
///
@@ -103,7 +99,6 @@ public:
static IAssetFactory* GetAssetFactory(const AssetInfo& assetInfo);
public:
-
///
/// Generates temporary asset path.
///
@@ -111,7 +106,6 @@ public:
API_FUNCTION() static String CreateTemporaryAssetPath();
public:
-
///
/// Gets content statistics.
///
@@ -263,7 +257,6 @@ public:
static bool IsAssetTypeIdInvalid(const ScriptingTypeHandle& type, const ScriptingTypeHandle& assetType);
public:
-
///
/// Finds the asset with at given path. Checks all loaded assets.
///
@@ -279,7 +272,6 @@ public:
API_FUNCTION() static Asset* GetAsset(const Guid& id);
public:
-
///
/// Deletes the specified asset.
///
@@ -293,7 +285,6 @@ public:
API_FUNCTION(Attributes="HideInEditor") static void DeleteAsset(const StringView& path);
public:
-
#if USE_EDITOR
///
@@ -364,13 +355,11 @@ public:
API_EVENT() static Delegate AssetReloading;
private:
-
static void tryCallOnLoaded(Asset* asset);
static void onAssetLoaded(Asset* asset);
static void onAssetUnload(Asset* asset);
static Asset* load(const Guid& id, const ScriptingTypeHandle& type, AssetInfo& assetInfo);
private:
-
static void deleteFileSafety(const StringView& path, const Guid& id);
};
diff --git a/Source/Engine/Content/Factories/BinaryAssetFactory.h b/Source/Engine/Content/Factories/BinaryAssetFactory.h
index 1f1047cdf..af6fb0e2f 100644
--- a/Source/Engine/Content/Factories/BinaryAssetFactory.h
+++ b/Source/Engine/Content/Factories/BinaryAssetFactory.h
@@ -19,7 +19,6 @@ class FlaxStorage;
class FLAXENGINE_API BinaryAssetFactoryBase : public IAssetFactory
{
public:
-
///
/// Initializes the specified asset. It's called in background before actual asset loading.
///
@@ -28,7 +27,6 @@ public:
bool Init(BinaryAsset* asset);
protected:
-
virtual BinaryAsset* Create(const AssetInfo& info) = 0;
virtual bool IsVersionSupported(uint32 serializedVersion) const = 0;
#if USE_EDITOR
@@ -36,7 +34,6 @@ protected:
#endif
public:
-
// [IAssetFactory]
Asset* New(const AssetInfo& info) override;
Asset* NewVirtual(const AssetInfo& info) override;
@@ -50,7 +47,6 @@ template
class BinaryAssetFactory : public BinaryAssetFactoryBase
{
public:
-
// [BinaryAssetFactoryBase]
bool IsVersionSupported(uint32 serializedVersion) const override
{
@@ -58,7 +54,6 @@ public:
}
protected:
-
// [BinaryAssetFactoryBase]
BinaryAsset* Create(const AssetInfo& info) override
{
diff --git a/Source/Engine/Content/Factories/IAssetFactory.h b/Source/Engine/Content/Factories/IAssetFactory.h
index ba24fa56a..7f6564ba7 100644
--- a/Source/Engine/Content/Factories/IAssetFactory.h
+++ b/Source/Engine/Content/Factories/IAssetFactory.h
@@ -15,7 +15,6 @@ class IAssetUpgrader;
class FLAXENGINE_API IAssetFactory
{
public:
-
typedef Dictionary Collection;
///
@@ -28,7 +27,6 @@ public:
}
public:
-
///
/// Finalizes an instance of the class.
///
@@ -37,7 +35,6 @@ public:
}
public:
-
///
/// Determines whenever the virtual assets are supported by this asset tpe factory.
///
diff --git a/Source/Engine/Content/Factories/JsonAssetFactory.h b/Source/Engine/Content/Factories/JsonAssetFactory.h
index d10387bb8..aeb3b5fa8 100644
--- a/Source/Engine/Content/Factories/JsonAssetFactory.h
+++ b/Source/Engine/Content/Factories/JsonAssetFactory.h
@@ -13,16 +13,15 @@
class FLAXENGINE_API JsonAssetFactoryBase : public IAssetFactory
{
protected:
-
virtual JsonAssetBase* Create(const AssetInfo& info) = 0;
public:
-
// [IAssetFactory]
Asset* New(const AssetInfo& info) override
{
return Create(info);
}
+
Asset* NewVirtual(const AssetInfo& info) override
{
return Create(info);
@@ -37,7 +36,6 @@ template
class JsonAssetFactory : public JsonAssetFactoryBase
{
protected:
-
// [JsonAssetFactoryBase]
JsonAssetBase* Create(const AssetInfo& info) override
{
diff --git a/Source/Engine/Content/JsonAsset.h b/Source/Engine/Content/JsonAsset.h
index 566f90501..25d463b16 100644
--- a/Source/Engine/Content/JsonAsset.h
+++ b/Source/Engine/Content/JsonAsset.h
@@ -12,13 +12,11 @@
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API JsonAssetBase : public Asset
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(JsonAssetBase);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(JsonAssetBase);
protected:
-
String _path;
protected:
-
///
/// Initializes a new instance of the class.
///
@@ -27,7 +25,6 @@ protected:
explicit JsonAssetBase(const SpawnParams& params, const AssetInfo* info);
public:
-
///
/// The parsed json document.
///
@@ -63,7 +60,6 @@ public:
#endif
public:
-
// [Asset]
const String& GetPath() const override;
#if USE_EDITOR
@@ -71,7 +67,6 @@ public:
#endif
protected:
-
// [Asset]
LoadResult loadAsset() override;
void unload(bool isReloading) override;
@@ -86,12 +81,11 @@ protected:
///
API_CLASS(NoSpawn) class FLAXENGINE_API JsonAsset : public JsonAssetBase
{
-DECLARE_ASSET_HEADER(JsonAsset);
+ DECLARE_ASSET_HEADER(JsonAsset);
private:
ScriptingType::Dtor _dtor;
public:
-
///
/// The scripting type of the deserialized unmanaged object instance (e.g. PhysicalMaterial).
///
@@ -113,7 +107,6 @@ public:
}
protected:
-
// [JsonAssetBase]
LoadResult loadAsset() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Content/Loading/ContentLoadTask.h b/Source/Engine/Content/Loading/ContentLoadTask.h
index 2dfd03662..c36438ccc 100644
--- a/Source/Engine/Content/Loading/ContentLoadTask.h
+++ b/Source/Engine/Content/Loading/ContentLoadTask.h
@@ -16,7 +16,6 @@ class ContentLoadTask : public Task
friend LoadingThread;
public:
-
///
/// Describes work type
///
@@ -28,14 +27,12 @@ public:
DECLARE_ENUM_5(Result, Ok, AssetLoadError, MissingReferences, LoadDataError, TaskFailed);
private:
-
///
/// Task type
///
Type _type;
protected:
-
///
/// Initializes a new instance of the class.
///
@@ -46,7 +43,6 @@ protected:
}
public:
-
///
/// Gets a task type.
///
@@ -57,7 +53,6 @@ public:
}
public:
-
///
/// Checks if async task is loading given asset resource
///
@@ -69,11 +64,9 @@ public:
}
protected:
-
virtual Result run() = 0;
public:
-
// [Task]
String ToString() const override
{
@@ -84,7 +77,6 @@ public:
}
protected:
-
// [Task]
void Enqueue() override;
bool Run() override;
diff --git a/Source/Engine/Content/Loading/ContentLoadingManager.cpp b/Source/Engine/Content/Loading/ContentLoadingManager.cpp
index 64084b586..dedb2761f 100644
--- a/Source/Engine/Content/Loading/ContentLoadingManager.cpp
+++ b/Source/Engine/Content/Loading/ContentLoadingManager.cpp
@@ -31,7 +31,6 @@ using namespace ContentLoadingManagerImpl;
class ContentLoadingManagerService : public EngineService
{
public:
-
ContentLoadingManagerService()
: EngineService(TEXT("Content Loading Manager"), -500)
{
diff --git a/Source/Engine/Content/Loading/ContentLoadingManager.h b/Source/Engine/Content/Loading/ContentLoadingManager.h
index 7db67a1b4..51ea7f6dd 100644
--- a/Source/Engine/Content/Loading/ContentLoadingManager.h
+++ b/Source/Engine/Content/Loading/ContentLoadingManager.h
@@ -14,13 +14,11 @@ class ContentLoadTask;
class LoadingThread : public IRunnable
{
protected:
-
volatile int64 _exitFlag;
Thread* _thread;
int32 _totalTasksDoneCount;
public:
-
///
/// Init
///
@@ -32,7 +30,6 @@ public:
~LoadingThread();
public:
-
///
/// Gets the thread identifier.
///
@@ -40,7 +37,6 @@ public:
uint64 GetID() const;
public:
-
///
/// Returns true if thread has empty exit flag, so it can continue it's work
///
@@ -61,7 +57,6 @@ public:
void Join();
public:
-
///
/// Starts thread execution.
///
@@ -76,7 +71,6 @@ public:
void Run(ContentLoadTask* task);
public:
-
// [IRunnable]
String ToString() const override;
int32 Run() override;
@@ -93,7 +87,6 @@ class ContentLoadingManager
friend Asset;
public:
-
///
/// Checks if current execution context is thread used to load assets.
///
@@ -110,7 +103,6 @@ public:
static LoadingThread* GetCurrentLoadThread();
public:
-
///
/// Gets amount of enqueued tasks to perform.
///
diff --git a/Source/Engine/Content/SoftAssetReference.h b/Source/Engine/Content/SoftAssetReference.h
index eb182220d..a65099870 100644
--- a/Source/Engine/Content/SoftAssetReference.h
+++ b/Source/Engine/Content/SoftAssetReference.h
@@ -170,7 +170,6 @@ public:
}
public:
-
///
/// Gets the asset (or null if unassigned).
///
diff --git a/Source/Engine/Content/Storage/AssetHeader.h b/Source/Engine/Content/Storage/AssetHeader.h
index ec7b164dc..1c7761e11 100644
--- a/Source/Engine/Content/Storage/AssetHeader.h
+++ b/Source/Engine/Content/Storage/AssetHeader.h
@@ -39,7 +39,6 @@ struct FLAXENGINE_API AssetHeader
FlaxChunk* Chunks[ASSET_FILE_DATA_CHUNKS];
public:
-
///
/// Initializes a new instance of the struct.
///
@@ -51,7 +50,6 @@ public:
}
public:
-
///
/// Gets the chunks.
///
@@ -154,7 +152,6 @@ struct FLAXENGINE_API AssetInitData
#endif
public:
-
///
/// Gets the hash code.
///
diff --git a/Source/Engine/Content/Storage/ContentStorageManager.h b/Source/Engine/Content/Storage/ContentStorageManager.h
index 6f398e10a..5cc38e212 100644
--- a/Source/Engine/Content/Storage/ContentStorageManager.h
+++ b/Source/Engine/Content/Storage/ContentStorageManager.h
@@ -14,14 +14,12 @@ class FlaxPackage;
class FLAXENGINE_API ContentStorageManager
{
public:
-
///
/// Auto-release timeout for unused asset chunks.
///
static TimeSpan UnusedDataChunksLifetime;
public:
-
///
/// Gets the assets data storage container.
///
@@ -78,7 +76,6 @@ public:
static void EnsureUnlocked();
public:
-
///
/// Determines whether the specified path can be a binary asset file (based on it's extension).
///
@@ -94,7 +91,6 @@ public:
static bool IsFlaxStorageExtension(const String& extension);
public:
-
///
/// Gets the packages.
///
diff --git a/Source/Engine/Content/Storage/FlaxChunk.h b/Source/Engine/Content/Storage/FlaxChunk.h
index 66bfcd4e4..0aed68fc4 100644
--- a/Source/Engine/Content/Storage/FlaxChunk.h
+++ b/Source/Engine/Content/Storage/FlaxChunk.h
@@ -29,7 +29,6 @@ DECLARE_ENUM_OPERATORS(FlaxChunkFlags);
class FLAXENGINE_API FlaxChunk
{
public:
-
///
/// Chunk of data location info
///
@@ -68,7 +67,6 @@ public:
};
public:
-
///
/// The chunk location in file.
///
@@ -90,7 +88,6 @@ public:
BytesContainer Data;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -106,7 +103,6 @@ public:
}
public:
-
///
/// Gets this chunk data pointer.
///
diff --git a/Source/Engine/Content/Storage/FlaxFile.h b/Source/Engine/Content/Storage/FlaxFile.h
index 2a5ca96c0..9af86da0d 100644
--- a/Source/Engine/Content/Storage/FlaxFile.h
+++ b/Source/Engine/Content/Storage/FlaxFile.h
@@ -10,11 +10,9 @@
class FLAXENGINE_API FlaxFile : public FlaxStorage
{
protected:
-
Entry _asset;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -22,7 +20,6 @@ public:
FlaxFile(const StringView& path);
public:
-
// [FlaxStorage]
String ToString() const override;
bool IsPackage() const override;
@@ -35,7 +32,6 @@ public:
void Dispose() override;
protected:
-
// [FlaxStorage]
bool GetEntry(const Guid& id, Entry& e) override;
void AddEntry(Entry& e) override;
diff --git a/Source/Engine/Content/Storage/FlaxPackage.h b/Source/Engine/Content/Storage/FlaxPackage.h
index ee97fc483..4c468c925 100644
--- a/Source/Engine/Content/Storage/FlaxPackage.h
+++ b/Source/Engine/Content/Storage/FlaxPackage.h
@@ -11,11 +11,9 @@
class FLAXENGINE_API FlaxPackage : public FlaxStorage
{
protected:
-
Dictionary _entries;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -23,7 +21,6 @@ public:
FlaxPackage(const StringView& path);
public:
-
// [FlaxStorage]
String ToString() const override;
bool IsPackage() const override;
@@ -36,7 +33,6 @@ public:
void Dispose() override;
protected:
-
// [FlaxStorage]
bool GetEntry(const Guid& id, Entry& e) override;
void AddEntry(Entry& e) override;
diff --git a/Source/Engine/Content/Storage/FlaxStorage.h b/Source/Engine/Content/Storage/FlaxStorage.h
index d37cddcd1..62cb524bc 100644
--- a/Source/Engine/Content/Storage/FlaxStorage.h
+++ b/Source/Engine/Content/Storage/FlaxStorage.h
@@ -27,7 +27,6 @@ class FLAXENGINE_API FlaxStorage : public Object
friend class BinaryAsset;
public:
-
///
/// Magic code stored in file header to identify contents.
///
@@ -88,7 +87,6 @@ public:
};
protected:
-
// State
uint32 _refCount;
DateTime _lastRefLostTime;
@@ -104,24 +102,20 @@ protected:
String _path;
protected:
-
explicit FlaxStorage(const StringView& path);
private:
-
// Used by FlaxStorageReference:
void AddRef();
void RemoveRef();
public:
-
///
/// Finalizes an instance of the class.
///
virtual ~FlaxStorage();
public:
-
///
/// Locks the storage chunks data to prevent disposing them. Also ensures that file handles won't be closed while chunks are locked.
///
@@ -147,7 +141,6 @@ public:
static LockData Invalid;
private:
-
FlaxStorage* _storage;
LockData(FlaxStorage* storage)
@@ -158,14 +151,13 @@ public:
}
public:
-
LockData(const LockData& other)
: _storage(other._storage)
{
if (_storage)
_storage->LockChunks();
}
-
+
LockData(LockData&& other) noexcept
: _storage(other._storage)
{
@@ -208,7 +200,6 @@ public:
other._storage = nullptr;
return *this;
}
-
};
///
@@ -228,7 +219,6 @@ public:
LockData LockSafe();
public:
-
///
/// Gets the references count.
///
@@ -335,7 +325,6 @@ public:
}
public:
-
///
/// Loads package from the file.
///
@@ -417,7 +406,6 @@ public:
virtual void Dispose();
public:
-
///
/// Ticks this instance.
///
@@ -428,7 +416,6 @@ public:
#endif
public:
-
#if USE_EDITOR
///
@@ -489,7 +476,6 @@ public:
#endif
protected:
-
bool LoadAssetHeader(const Entry& e, AssetInitData& data);
void AddChunk(FlaxChunk* chunk);
virtual void AddEntry(Entry& e) = 0;
diff --git a/Source/Engine/Content/Storage/FlaxStorageReference.h b/Source/Engine/Content/Storage/FlaxStorageReference.h
index 8c15f457b..aa4d91202 100644
--- a/Source/Engine/Content/Storage/FlaxStorageReference.h
+++ b/Source/Engine/Content/Storage/FlaxStorageReference.h
@@ -10,11 +10,9 @@
struct FLAXENGINE_API FlaxStorageReference
{
private:
-
FlaxStorage* _storage;
public:
-
FlaxStorageReference(FlaxStorage* storage)
: _storage(storage)
{
@@ -36,14 +34,12 @@ public:
}
public:
-
FORCE_INLINE FlaxStorage* Get() const
{
return _storage;
}
public:
-
FlaxStorageReference& operator=(const FlaxStorageReference& other)
{
if (this != &other)
diff --git a/Source/Engine/Content/Storage/JsonStorageProxy.h b/Source/Engine/Content/Storage/JsonStorageProxy.h
index 198ebb8c3..1af6c197f 100644
--- a/Source/Engine/Content/Storage/JsonStorageProxy.h
+++ b/Source/Engine/Content/Storage/JsonStorageProxy.h
@@ -14,7 +14,6 @@ struct AssetInfo;
class FLAXENGINE_API JsonStorageProxy
{
public:
-
///
/// Determines whether the specified extension can be a json resource file.
///
diff --git a/Source/Engine/Content/Upgraders/AudioClipUpgrader.h b/Source/Engine/Content/Upgraders/AudioClipUpgrader.h
index 426835f4a..730e93ef6 100644
--- a/Source/Engine/Content/Upgraders/AudioClipUpgrader.h
+++ b/Source/Engine/Content/Upgraders/AudioClipUpgrader.h
@@ -16,7 +16,6 @@
class AudioClipUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -30,7 +29,6 @@ public:
}
private:
-
// ============================================
// Version 1:
// Designed: 26.02.2018
@@ -88,32 +86,32 @@ private:
int32 numSamples;
switch (oldHeader.Format)
{
- case AudioFormat::Raw:
- {
- numSamples = chunk->Size() / (oldHeader.Info.BitDepth / 8);
- break;
- }
- case AudioFormat::Vorbis:
- {
+ case AudioFormat::Raw:
+ {
+ numSamples = chunk->Size() / (oldHeader.Info.BitDepth / 8);
+ break;
+ }
+ case AudioFormat::Vorbis:
+ {
#if COMPILE_WITH_OGG_VORBIS
- OggVorbisDecoder decoder;
- MemoryReadStream stream(chunk->Get(), chunk->Size());
- AudioDataInfo outInfo;
- if (!decoder.Open(&stream, outInfo, 0))
- {
- LOG(Warning, "Audio data open failed (OggVorbisDecoder).");
- return true;
- }
- numSamples = outInfo.NumSamples;
+ OggVorbisDecoder decoder;
+ MemoryReadStream stream(chunk->Get(), chunk->Size());
+ AudioDataInfo outInfo;
+ if (!decoder.Open(&stream, outInfo, 0))
+ {
+ LOG(Warning, "Audio data open failed (OggVorbisDecoder).");
+ return true;
+ }
+ numSamples = outInfo.NumSamples;
#else
LOG(Warning, "OggVorbisDecoder is disabled.");
return true;
#endif
- break;
- }
- default:
- LOG(Warning, "Unknown audio data format.");
- return true;
+ break;
+ }
+ default:
+ LOG(Warning, "Unknown audio data format.");
+ return true;
}
newHeader.SamplesPerChunk[chunkIndex] = numSamples;
}
diff --git a/Source/Engine/Content/Upgraders/BinaryAssetUpgrader.h b/Source/Engine/Content/Upgraders/BinaryAssetUpgrader.h
index e1aa7e8f2..ba275337e 100644
--- a/Source/Engine/Content/Upgraders/BinaryAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/BinaryAssetUpgrader.h
@@ -24,7 +24,6 @@ struct FLAXENGINE_API AssetMigrationContext
AssetInitData Output;
public:
-
///
/// Allocates the chunk in the output data so upgrader can write to it.
///
@@ -68,7 +67,6 @@ typedef bool (*UpgradeHandler)(AssetMigrationContext& context);
class FLAXENGINE_API BinaryAssetUpgrader : public IAssetUpgrader
{
public:
-
struct Upgrader
{
uint32 CurrentVersion;
@@ -77,12 +75,10 @@ public:
};
private:
-
Upgrader const* _upgraders;
int32 _upgradersCount;
public:
-
///
/// Upgrades the specified asset data serialized version.
///
@@ -114,7 +110,6 @@ public:
}
public:
-
///
/// Copies all the chunks from the input data to the output container.
///
@@ -179,7 +174,6 @@ public:
}
protected:
-
BinaryAssetUpgrader()
{
_upgraders = nullptr;
@@ -193,7 +187,6 @@ protected:
}
public:
-
// [IAssetUpgrader]
bool ShouldUpgrade(uint32 serializedVersion) const override
{
diff --git a/Source/Engine/Content/Upgraders/FontAssetUpgrader.h b/Source/Engine/Content/Upgraders/FontAssetUpgrader.h
index 1a42077a1..b607acade 100644
--- a/Source/Engine/Content/Upgraders/FontAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/FontAssetUpgrader.h
@@ -14,7 +14,6 @@
class FontAssetUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -29,7 +28,6 @@ public:
}
private:
-
// ============================================
// Version 1:
// Designed: long time ago in a galaxy far far away
diff --git a/Source/Engine/Content/Upgraders/IAssetUpgrader.h b/Source/Engine/Content/Upgraders/IAssetUpgrader.h
index 17ea8c260..97179d494 100644
--- a/Source/Engine/Content/Upgraders/IAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/IAssetUpgrader.h
@@ -12,7 +12,6 @@
class FLAXENGINE_API IAssetUpgrader
{
public:
-
///
/// Finalizes an instance of the class.
///
@@ -21,7 +20,6 @@ public:
}
public:
-
///
/// Checks if given asset version should be converted.
///
diff --git a/Source/Engine/Content/Upgraders/MaterialInstanceUpgrader.h b/Source/Engine/Content/Upgraders/MaterialInstanceUpgrader.h
index b96f23612..c8796cb04 100644
--- a/Source/Engine/Content/Upgraders/MaterialInstanceUpgrader.h
+++ b/Source/Engine/Content/Upgraders/MaterialInstanceUpgrader.h
@@ -17,7 +17,6 @@
class MaterialInstanceUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -32,7 +31,6 @@ public:
}
private:
-
// ============================================
// Version 4:
// Designed: 5/18/2017
diff --git a/Source/Engine/Content/Upgraders/ModelAssetUpgrader.h b/Source/Engine/Content/Upgraders/ModelAssetUpgrader.h
index 599758bbe..135696b9a 100644
--- a/Source/Engine/Content/Upgraders/ModelAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/ModelAssetUpgrader.h
@@ -19,7 +19,6 @@
class ModelAssetUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -36,7 +35,6 @@ public:
}
private:
-
// ============================================
// Version 25:
// The same as version 24 except Vertex Buffer 1 has `Color32 Color` component per vertex added
diff --git a/Source/Engine/Content/Upgraders/ShaderAssetUpgrader.h b/Source/Engine/Content/Upgraders/ShaderAssetUpgrader.h
index 99fda669f..87cbc758d 100644
--- a/Source/Engine/Content/Upgraders/ShaderAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/ShaderAssetUpgrader.h
@@ -15,7 +15,6 @@
class ShaderAssetUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -29,7 +28,6 @@ public:
}
private:
-
// ============================================
// Version 18:
// Designed: 7/24/2019
diff --git a/Source/Engine/Content/Upgraders/SkeletonMaskUpgrader.h b/Source/Engine/Content/Upgraders/SkeletonMaskUpgrader.h
index 7a1d3842e..9cf2bf08e 100644
--- a/Source/Engine/Content/Upgraders/SkeletonMaskUpgrader.h
+++ b/Source/Engine/Content/Upgraders/SkeletonMaskUpgrader.h
@@ -17,7 +17,6 @@
class SkeletonMaskUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -31,7 +30,6 @@ public:
}
private:
-
static bool Upgrade_1_To_2(AssetMigrationContext& context)
{
ASSERT(context.Input.SerializedVersion == 1 && context.Output.SerializedVersion == 2);
@@ -85,7 +83,7 @@ private:
if (context.AllocateChunk(0))
return true;
MemoryWriteStream stream(4096);
-
+
const Guid skeletonId = skeleton.GetID();
stream.Write(&skeletonId);
stream.WriteInt32(nodesMask.Count());
diff --git a/Source/Engine/Content/Upgraders/SkinnedModelAssetUpgrader.h b/Source/Engine/Content/Upgraders/SkinnedModelAssetUpgrader.h
index b2dc06b78..4b1bfaf30 100644
--- a/Source/Engine/Content/Upgraders/SkinnedModelAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/SkinnedModelAssetUpgrader.h
@@ -21,7 +21,6 @@
class SkinnedModelAssetUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -37,7 +36,6 @@ public:
}
private:
-
static bool Upgrade_1_To_2(AssetMigrationContext& context)
{
ASSERT(context.Input.SerializedVersion == 1 && context.Output.SerializedVersion == 2);
diff --git a/Source/Engine/Content/Upgraders/TextureAssetUpgrader.h b/Source/Engine/Content/Upgraders/TextureAssetUpgrader.h
index 18d23e0ed..68e413159 100644
--- a/Source/Engine/Content/Upgraders/TextureAssetUpgrader.h
+++ b/Source/Engine/Content/Upgraders/TextureAssetUpgrader.h
@@ -26,7 +26,6 @@
class TextureAssetUpgrader : public BinaryAssetUpgrader
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -40,7 +39,6 @@ public:
}
private:
-
// ============================================
// Versions 1, 2 and 3:
// Designed: long time ago in a galaxy far far away
@@ -178,10 +176,10 @@ private:
case PixelFormat::R32G32B32A32_UInt:
case PixelFormat::R32G32B32A32_SInt:
return PixelFormatOld::PF_R32G32B32A32;
- //case PixelFormat::R32G32B32_Typeless:
- //case PixelFormat::R32G32B32_Float:
- //case PixelFormat::R32G32B32_UInt:
- //case PixelFormat::R32G32B32_SInt:
+ //case PixelFormat::R32G32B32_Typeless:
+ //case PixelFormat::R32G32B32_Float:
+ //case PixelFormat::R32G32B32_UInt:
+ //case PixelFormat::R32G32B32_SInt:
case PixelFormat::R16G16B16A16_Typeless:
case PixelFormat::R16G16B16A16_Float:
case PixelFormat::R16G16B16A16_UNorm:
@@ -231,7 +229,7 @@ private:
case PixelFormat::D24_UNorm_S8_UInt:
case PixelFormat::R24_UNorm_X8_Typeless:
return PixelFormatOld::PF_DepthStencil;
- //case PixelFormat::X24_Typeless_G8_UInt:
+ //case PixelFormat::X24_Typeless_G8_UInt:
case PixelFormat::R8G8_Typeless:
case PixelFormat::R8G8_UNorm:
case PixelFormat::R8G8_UInt:
@@ -256,9 +254,9 @@ private:
case PixelFormat::A8_UNorm:
return PixelFormatOld::PF_A8;
case PixelFormat::R1_UNorm:
- //case PixelFormat::R9G9B9E5_Sharedexp:
- //case PixelFormat::R8G8_B8G8_UNorm:
- //case PixelFormat::G8R8_G8B8_UNorm:
+ //case PixelFormat::R9G9B9E5_Sharedexp:
+ //case PixelFormat::R8G8_B8G8_UNorm:
+ //case PixelFormat::G8R8_G8B8_UNorm:
case PixelFormat::BC1_Typeless:
case PixelFormat::BC1_UNorm:
case PixelFormat::BC1_UNorm_sRGB:
@@ -281,20 +279,20 @@ private:
return PixelFormatOld::PF_BC5;
case PixelFormat::B5G6R5_UNorm:
return PixelFormatOld::PF_B5G6R5;
- //case PixelFormat::B5G5R5A1_UNorm:
- //case PixelFormat::B8G8R8A8_UNorm:
- //case PixelFormat::B8G8R8X8_UNorm:
- //case PixelFormat::R10G10B10_Xr_Bias_A2_UNorm:
- //case PixelFormat::B8G8R8A8_Typeless:
- //case PixelFormat::B8G8R8A8_UNorm_sRGB:
- //case PixelFormat::B8G8R8X8_Typeless:
- //case PixelFormat::B8G8R8X8_UNorm_sRGB:
- //case PixelFormat::BC6H_Typeless:
- //case PixelFormat::BC6H_Uf16:
- //case PixelFormat::BC6H_Sf16:
- //case PixelFormat::BC7_Typeless:
- //case PixelFormat::BC7_UNorm:
- //case PixelFormat::BC7_UNorm_sRGB:
+ //case PixelFormat::B5G5R5A1_UNorm:
+ //case PixelFormat::B8G8R8A8_UNorm:
+ //case PixelFormat::B8G8R8X8_UNorm:
+ //case PixelFormat::R10G10B10_Xr_Bias_A2_UNorm:
+ //case PixelFormat::B8G8R8A8_Typeless:
+ //case PixelFormat::B8G8R8A8_UNorm_sRGB:
+ //case PixelFormat::B8G8R8X8_Typeless:
+ //case PixelFormat::B8G8R8X8_UNorm_sRGB:
+ //case PixelFormat::BC6H_Typeless:
+ //case PixelFormat::BC6H_Uf16:
+ //case PixelFormat::BC6H_Sf16:
+ //case PixelFormat::BC7_Typeless:
+ //case PixelFormat::BC7_UNorm:
+ //case PixelFormat::BC7_UNorm_sRGB:
default:
break;
}
diff --git a/Source/Engine/Content/WeakAssetReference.h b/Source/Engine/Content/WeakAssetReference.h
index 4bca98ba0..1124e9656 100644
--- a/Source/Engine/Content/WeakAssetReference.h
+++ b/Source/Engine/Content/WeakAssetReference.h
@@ -10,15 +10,12 @@
API_CLASS(InBuild) class WeakAssetReferenceBase
{
public:
-
typedef Delegate<> EventType;
protected:
-
Asset* _asset = nullptr;
public:
-
///
/// The asset unloading event (should cleanup refs to it).
///
@@ -38,7 +35,6 @@ public:
~WeakAssetReferenceBase();
public:
-
///
/// Gets the asset ID or Guid::Empty if not set.
///
@@ -61,7 +57,6 @@ public:
String ToString() const;
protected:
-
void OnSet(Asset* asset);
void OnUnloaded(Asset* asset);
};
@@ -73,7 +68,6 @@ template
API_CLASS(InBuild) class WeakAssetReference : public WeakAssetReferenceBase
{
public:
-
///
/// Initializes a new instance of the class.
///
@@ -125,7 +119,6 @@ public:
}
public:
-
FORCE_INLINE WeakAssetReference& operator=(const WeakAssetReference& other)
{
OnSet(other.Get());
@@ -196,7 +189,6 @@ public:
}
public:
-
///
/// Sets the asset reference.
///
diff --git a/Source/Engine/ContentExporters/AssetExporters.h b/Source/Engine/ContentExporters/AssetExporters.h
index 4a7c8b5de..28e98cd1f 100644
--- a/Source/Engine/ContentExporters/AssetExporters.h
+++ b/Source/Engine/ContentExporters/AssetExporters.h
@@ -9,7 +9,6 @@
class AssetExporters
{
public:
-
static ExportAssetResult ExportTexture(ExportAssetContext& context);
static ExportAssetResult ExportCubeTexture(ExportAssetContext& context);
static ExportAssetResult ExportAudioClip(ExportAssetContext& context);
diff --git a/Source/Engine/ContentExporters/AssetsExportingManager.cpp b/Source/Engine/ContentExporters/AssetsExportingManager.cpp
index 6a8be66b2..fcb8a88d9 100644
--- a/Source/Engine/ContentExporters/AssetsExportingManager.cpp
+++ b/Source/Engine/ContentExporters/AssetsExportingManager.cpp
@@ -20,7 +20,6 @@ Dictionary AssetsExportingManager::Exporters;
class AssetsExportingManagerService : public EngineService
{
public:
-
AssetsExportingManagerService()
: EngineService(TEXT("AssetsExportingManager"), -300)
{
diff --git a/Source/Engine/ContentExporters/AssetsExportingManager.h b/Source/Engine/ContentExporters/AssetsExportingManager.h
index 2ff11f2a2..bd87220cb 100644
--- a/Source/Engine/ContentExporters/AssetsExportingManager.h
+++ b/Source/Engine/ContentExporters/AssetsExportingManager.h
@@ -13,14 +13,12 @@
class AssetsExportingManager
{
public:
-
///
/// The asset exporting callbacks. Identified by the asset typename.
///
static Dictionary Exporters;
public:
-
///
/// Gets the asset export for thee given asset typename.
///
@@ -36,7 +34,6 @@ public:
static bool CanExport(const String& inputPath);
public:
-
///
/// Exports the asset.
///
diff --git a/Source/Engine/ContentExporters/Types.h b/Source/Engine/ContentExporters/Types.h
index 06d2279ec..8d520aefb 100644
--- a/Source/Engine/ContentExporters/Types.h
+++ b/Source/Engine/ContentExporters/Types.h
@@ -29,7 +29,6 @@ typedef Function ExportAssetFunction;
class ExportAssetContext : public NonCopyable
{
public:
-
///
/// The asset reference (prepared by the context to be used by callback).
///
@@ -56,7 +55,6 @@ public:
void* CustomArg;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -73,7 +71,6 @@ public:
}
public:
-
///
/// Runs the specified callback.
///
diff --git a/Source/Engine/ContentImporters/AssetsImportingManager.cpp b/Source/Engine/ContentImporters/AssetsImportingManager.cpp
index 39c63a201..4d8d49c87 100644
--- a/Source/Engine/ContentImporters/AssetsImportingManager.cpp
+++ b/Source/Engine/ContentImporters/AssetsImportingManager.cpp
@@ -56,7 +56,6 @@ const String AssetsImportingManager::CreateVisualScriptTag(TEXT("VisualScript"))
class AssetsImportingManagerService : public EngineService
{
public:
-
AssetsImportingManagerService()
: EngineService(TEXT("AssetsImportingManager"), -400)
{
diff --git a/Source/Engine/ContentImporters/AssetsImportingManager.h b/Source/Engine/ContentImporters/AssetsImportingManager.h
index 6d97bd39d..67cafec17 100644
--- a/Source/Engine/ContentImporters/AssetsImportingManager.h
+++ b/Source/Engine/ContentImporters/AssetsImportingManager.h
@@ -12,7 +12,6 @@
class AssetsImportingManager
{
public:
-
///
/// The asset importers.
///
@@ -24,7 +23,6 @@ public:
static Array Creators;
public:
-
///
/// The create texture tag (using internal import pipeline to crate texture asset from custom image source).
///
@@ -116,7 +114,6 @@ public:
static const String CreateVisualScriptTag;
public:
-
///
/// Gets the asset importer by file extension.
///
@@ -132,7 +129,6 @@ public:
static const AssetCreator* GetCreator(const String& tag);
public:
-
///
/// Creates new asset.
///
@@ -226,7 +222,6 @@ public:
}
private:
-
static bool Create(const CreateAssetFunction& callback, const StringView& inputPath, const StringView& outputPath, Guid& assetId, void* arg);
};
diff --git a/Source/Engine/ContentImporters/CreateAnimationGraph.h b/Source/Engine/ContentImporters/CreateAnimationGraph.h
index 8ada19b72..785839aa8 100644
--- a/Source/Engine/ContentImporters/CreateAnimationGraph.h
+++ b/Source/Engine/ContentImporters/CreateAnimationGraph.h
@@ -12,7 +12,6 @@
class CreateAnimationGraph
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateAnimationGraphFunction.h b/Source/Engine/ContentImporters/CreateAnimationGraphFunction.h
index 0cbac7deb..2dd47b62f 100644
--- a/Source/Engine/ContentImporters/CreateAnimationGraphFunction.h
+++ b/Source/Engine/ContentImporters/CreateAnimationGraphFunction.h
@@ -15,7 +15,6 @@
class CreateAnimationGraphFunction
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateCollisionData.h b/Source/Engine/ContentImporters/CreateCollisionData.h
index 547a10485..b29a61198 100644
--- a/Source/Engine/ContentImporters/CreateCollisionData.h
+++ b/Source/Engine/ContentImporters/CreateCollisionData.h
@@ -16,7 +16,6 @@
class CreateCollisionData
{
public:
-
///
/// Creates the CollisionData.
///
diff --git a/Source/Engine/ContentImporters/CreateJson.h b/Source/Engine/ContentImporters/CreateJson.h
index 91595cae8..5622c5746 100644
--- a/Source/Engine/ContentImporters/CreateJson.h
+++ b/Source/Engine/ContentImporters/CreateJson.h
@@ -14,7 +14,6 @@
class CreateJson
{
public:
-
static bool Create(const StringView& path, rapidjson_flax::StringBuffer& data, const String& dataTypename);
static bool Create(const StringView& path, rapidjson_flax::StringBuffer& data, const char* dataTypename);
static bool Create(const StringView& path, StringAnsiView& data, StringAnsiView& dataTypename);
diff --git a/Source/Engine/ContentImporters/CreateMaterial.h b/Source/Engine/ContentImporters/CreateMaterial.h
index 70dc3b338..ee0e1095d 100644
--- a/Source/Engine/ContentImporters/CreateMaterial.h
+++ b/Source/Engine/ContentImporters/CreateMaterial.h
@@ -14,7 +14,6 @@
class CreateMaterial
{
public:
-
struct Options
{
MaterialInfo Info;
diff --git a/Source/Engine/ContentImporters/CreateMaterialFunction.h b/Source/Engine/ContentImporters/CreateMaterialFunction.h
index 83f1706a2..8e407deb8 100644
--- a/Source/Engine/ContentImporters/CreateMaterialFunction.h
+++ b/Source/Engine/ContentImporters/CreateMaterialFunction.h
@@ -16,7 +16,6 @@
class CreateMaterialFunction
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateMaterialInstance.h b/Source/Engine/ContentImporters/CreateMaterialInstance.h
index 8c8ec5883..c2d5097e1 100644
--- a/Source/Engine/ContentImporters/CreateMaterialInstance.h
+++ b/Source/Engine/ContentImporters/CreateMaterialInstance.h
@@ -16,7 +16,6 @@
class CreateMaterialInstance
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateParticleEmitter.h b/Source/Engine/ContentImporters/CreateParticleEmitter.h
index f3123c724..ff948950f 100644
--- a/Source/Engine/ContentImporters/CreateParticleEmitter.h
+++ b/Source/Engine/ContentImporters/CreateParticleEmitter.h
@@ -14,7 +14,6 @@
class CreateParticleEmitter
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateParticleEmitterFunction.h b/Source/Engine/ContentImporters/CreateParticleEmitterFunction.h
index 2d649652f..d66699ab8 100644
--- a/Source/Engine/ContentImporters/CreateParticleEmitterFunction.h
+++ b/Source/Engine/ContentImporters/CreateParticleEmitterFunction.h
@@ -15,7 +15,6 @@
class CreateParticleEmitterFunction
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateParticleSystem.h b/Source/Engine/ContentImporters/CreateParticleSystem.h
index 75a760b86..deb04f593 100644
--- a/Source/Engine/ContentImporters/CreateParticleSystem.h
+++ b/Source/Engine/ContentImporters/CreateParticleSystem.h
@@ -14,7 +14,6 @@
class CreateParticleSystem
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateRawData.h b/Source/Engine/ContentImporters/CreateRawData.h
index 05f55f5c6..1c845c778 100644
--- a/Source/Engine/ContentImporters/CreateRawData.h
+++ b/Source/Engine/ContentImporters/CreateRawData.h
@@ -13,7 +13,6 @@
class CreateRawData
{
public:
-
///
/// Creates the raw data asset.
///
diff --git a/Source/Engine/ContentImporters/CreateSceneAnimation.h b/Source/Engine/ContentImporters/CreateSceneAnimation.h
index 314d98367..6624c0ff6 100644
--- a/Source/Engine/ContentImporters/CreateSceneAnimation.h
+++ b/Source/Engine/ContentImporters/CreateSceneAnimation.h
@@ -14,7 +14,6 @@
class CreateSceneAnimation
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateSkeletonMask.h b/Source/Engine/ContentImporters/CreateSkeletonMask.h
index 6fa4ef36a..4bfebadb2 100644
--- a/Source/Engine/ContentImporters/CreateSkeletonMask.h
+++ b/Source/Engine/ContentImporters/CreateSkeletonMask.h
@@ -14,7 +14,6 @@
class CreateSkeletonMask
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/CreateVisualScript.h b/Source/Engine/ContentImporters/CreateVisualScript.h
index ab753af29..d40889908 100644
--- a/Source/Engine/ContentImporters/CreateVisualScript.h
+++ b/Source/Engine/ContentImporters/CreateVisualScript.h
@@ -13,7 +13,6 @@
class CreateVisualScript
{
public:
-
///
/// Creates the asset.
///
diff --git a/Source/Engine/ContentImporters/ImportAudio.h b/Source/Engine/ContentImporters/ImportAudio.h
index 0090bd2c3..d269e6851 100644
--- a/Source/Engine/ContentImporters/ImportAudio.h
+++ b/Source/Engine/ContentImporters/ImportAudio.h
@@ -20,7 +20,6 @@
class ImportAudio
{
public:
-
///
/// Importing audio options
///
@@ -44,14 +43,12 @@ public:
String ToString() const;
public:
-
// [ISerializable]
void Serialize(SerializeStream& stream, const void* otherObj) override;
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
};
public:
-
///
/// Tries the get audio import options from the target location asset.
///
diff --git a/Source/Engine/ContentImporters/ImportFont.h b/Source/Engine/ContentImporters/ImportFont.h
index 627cb6861..b067f4f6b 100644
--- a/Source/Engine/ContentImporters/ImportFont.h
+++ b/Source/Engine/ContentImporters/ImportFont.h
@@ -12,7 +12,6 @@
class ImportFont
{
public:
-
///
/// Imports the font file.
///
diff --git a/Source/Engine/ContentImporters/ImportIES.h b/Source/Engine/ContentImporters/ImportIES.h
index e44aa158e..5060626a7 100644
--- a/Source/Engine/ContentImporters/ImportIES.h
+++ b/Source/Engine/ContentImporters/ImportIES.h
@@ -13,14 +13,12 @@
class ImportIES
{
private:
-
float _brightness = 0;
Array _hAngles;
Array _vAngles;
Array _candalaValues;
public:
-
///
/// Loads the IES file.
///
@@ -36,7 +34,6 @@ public:
float ExtractInR16(Array& output);
public:
-
uint32 GetWidth() const
{
return 256;
@@ -53,7 +50,6 @@ public:
}
private:
-
float InterpolatePoint(int32 x, int32 y) const;
float InterpolateBilinear(float x, float y) const;
static float ComputeFilterPos(float value, const Array& sortedValues);
diff --git a/Source/Engine/ContentImporters/ImportModel.h b/Source/Engine/ContentImporters/ImportModel.h
index 6d49ca826..098805a20 100644
--- a/Source/Engine/ContentImporters/ImportModel.h
+++ b/Source/Engine/ContentImporters/ImportModel.h
@@ -19,11 +19,9 @@
class ImportModelFile
{
public:
-
typedef ModelTool::Options Options;
public:
-
///
/// Tries the get model import options from the target location asset.
///
@@ -47,7 +45,6 @@ public:
static CreateAssetResult Create(CreateAssetContext& context);
private:
-
static CreateAssetResult ImportModel(CreateAssetContext& context, ModelData& modelData, const Options* options = nullptr);
static CreateAssetResult ImportSkinnedModel(CreateAssetContext& context, ModelData& modelData, const Options* options = nullptr);
static CreateAssetResult ImportAnimation(CreateAssetContext& context, ModelData& modelData, const Options* options = nullptr);
diff --git a/Source/Engine/ContentImporters/ImportModelFile.h b/Source/Engine/ContentImporters/ImportModelFile.h
index a262e6394..c4e9102c8 100644
--- a/Source/Engine/ContentImporters/ImportModelFile.h
+++ b/Source/Engine/ContentImporters/ImportModelFile.h
@@ -20,11 +20,9 @@
class ImportModelFile
{
public:
-
typedef ModelTool::Options Options;
public:
-
///
/// Tries the get model import options from the target location asset.
///
@@ -48,7 +46,6 @@ public:
static CreateAssetResult Create(CreateAssetContext& context);
private:
-
static CreateAssetResult ImportModel(CreateAssetContext& context, ModelData& modelData);
static CreateAssetResult ImportSkinnedModel(CreateAssetContext& context, ModelData& modelData);
static CreateAssetResult ImportAnimation(CreateAssetContext& context, ModelData& modelData);
diff --git a/Source/Engine/ContentImporters/ImportShader.h b/Source/Engine/ContentImporters/ImportShader.h
index 30ec90d66..00b178b53 100644
--- a/Source/Engine/ContentImporters/ImportShader.h
+++ b/Source/Engine/ContentImporters/ImportShader.h
@@ -12,7 +12,6 @@
class ImportShader
{
public:
-
///
/// Imports the shader file.
///
diff --git a/Source/Engine/ContentImporters/ImportTexture.h b/Source/Engine/ContentImporters/ImportTexture.h
index 4c042aad7..2328979f9 100644
--- a/Source/Engine/ContentImporters/ImportTexture.h
+++ b/Source/Engine/ContentImporters/ImportTexture.h
@@ -20,11 +20,9 @@
class ImportTexture
{
public:
-
typedef TextureTool::Options Options;
public:
-
///
/// Tries the get texture import options from the target location asset.
///
@@ -93,7 +91,6 @@ public:
static CreateAssetResult ImportIES(CreateAssetContext& context);
private:
-
static void InitOptions(CreateAssetContext& context, Options& options);
static CreateAssetResult Create(CreateAssetContext& context, const TextureData& textureData, Options& options);
static CreateAssetResult Create(CreateAssetContext& context, const TextureBase::InitData& textureData, Options& options);
diff --git a/Source/Engine/ContentImporters/Types.h b/Source/Engine/ContentImporters/Types.h
index eba132d8e..9ae577400 100644
--- a/Source/Engine/ContentImporters/Types.h
+++ b/Source/Engine/ContentImporters/Types.h
@@ -31,11 +31,9 @@ typedef Function CreateAssetFunction;
class CreateAssetContext : public NonCopyable
{
private:
-
CreateAssetResult _applyChangesResult;
public:
-
///
/// Path of the input file (may be empty if creating new asset)
///
@@ -70,7 +68,6 @@ public:
// TODO: add cancellation feature - so progress can be aborted on demand
public:
-
///
/// Initializes a new instance of the class.
///
@@ -88,7 +85,6 @@ public:
}
public:
-
///
/// Runs the specified callback.
///
@@ -97,7 +93,6 @@ public:
CreateAssetResult Run(const CreateAssetFunction& callback);
public:
-
///
/// Allocates the chunk in the output data so upgrader can write to it.
///
@@ -112,7 +107,6 @@ public:
void AddMeta(JsonWriter& writer) const;
private:
-
void ApplyChanges();
};
@@ -122,7 +116,6 @@ private:
struct AssetImporter
{
public:
-
///
/// Extension of the file to import with that importer (without leading dot).
///
@@ -145,7 +138,6 @@ public:
struct AssetCreator
{
public:
-
///
/// Asset creators are identifiable by tag
///
diff --git a/Source/Engine/Debug/DebugDraw.h b/Source/Engine/Debug/DebugDraw.h
index 3a2e1f0ec..95e640d7b 100644
--- a/Source/Engine/Debug/DebugDraw.h
+++ b/Source/Engine/Debug/DebugDraw.h
@@ -21,7 +21,7 @@ struct Transform;
///
API_CLASS(Static) class FLAXENGINE_API DebugDraw
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(DebugDraw);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(DebugDraw);
#if USE_EDITOR
diff --git a/Source/Engine/Debug/DebugLog.h b/Source/Engine/Debug/DebugLog.h
index d0d4e0e6c..afc05fd32 100644
--- a/Source/Engine/Debug/DebugLog.h
+++ b/Source/Engine/Debug/DebugLog.h
@@ -11,7 +11,6 @@
class FLAXENGINE_API DebugLog
{
public:
-
///
/// Sends the log message to the Flax console and the log file.
///
@@ -53,7 +52,6 @@ public:
static void LogException(MObject* exceptionObject);
public:
-
///
/// Gets the managed stack trace.
///
diff --git a/Source/Engine/Debug/Exception.h b/Source/Engine/Debug/Exception.h
index 7e563f5b1..a849210c6 100644
--- a/Source/Engine/Debug/Exception.h
+++ b/Source/Engine/Debug/Exception.h
@@ -16,13 +16,11 @@ namespace Log
class FLAXENGINE_API Exception : public Object
{
protected:
-
String _message;
String _additionalInfo;
LogType _level;
public:
-
///
/// Creates default exception without additional data
///
@@ -53,14 +51,12 @@ namespace Log
}
public:
-
///
/// Virtual destructor
///
virtual ~Exception();
public:
-
///
/// Gets a message that describes the current exception.
///
@@ -128,7 +124,6 @@ namespace Log
// TODO: implement StackTrace caching: https://www.codeproject.com/kb/threads/stackwalker.aspx
public:
-
// [Object]
String ToString() const final override
{
diff --git a/Source/Engine/Foliage/Foliage.cpp b/Source/Engine/Foliage/Foliage.cpp
index feed93913..76056ac44 100644
--- a/Source/Engine/Foliage/Foliage.cpp
+++ b/Source/Engine/Foliage/Foliage.cpp
@@ -200,7 +200,7 @@ void Foliage::DrawCluster(RenderContext& renderContext, FoliageCluster* cluster,
instance.DrawState.PrevLOD = lodIndex;
}
}
- // Check if there was a gap between frames in drawing this model instance
+ // Check if there was a gap between frames in drawing this model instance
else if (modelFrame < frame || instance.DrawState.PrevLOD == -1)
{
// Reset state
@@ -846,7 +846,7 @@ bool Foliage::Intersects(const Ray& ray, Real& distance, Vector3& normal, int32&
void Foliage::Draw(RenderContext& renderContext)
{
if (renderContext.View.Pass == DrawPass::GlobalSDF)
- return; // TODO: Foliage rendering to Global SDF
+ return; // TODO: Foliage rendering to Global SDF
if (renderContext.View.Pass == DrawPass::GlobalSurfaceAtlas)
return; // Not supported
if (Instances.IsEmpty())
diff --git a/Source/Engine/Foliage/Foliage.h b/Source/Engine/Foliage/Foliage.h
index 5bea2462d..100e25338 100644
--- a/Source/Engine/Foliage/Foliage.h
+++ b/Source/Engine/Foliage/Foliage.h
@@ -14,14 +14,12 @@
///
API_CLASS() class FLAXENGINE_API Foliage final : public Actor
{
-DECLARE_SCENE_OBJECT(Foliage);
+ DECLARE_SCENE_OBJECT(Foliage);
private:
-
bool _disableFoliageTypeEvents;
int32 _sceneRenderingKey = -1;
public:
-
///
/// The allocated foliage instances. It's read-only.
///
@@ -46,7 +44,6 @@ public:
Array FoliageTypes;
public:
-
///
/// Gets the total amount of the instanced of foliage.
///
@@ -138,7 +135,6 @@ public:
API_FUNCTION() void UpdateCullDistance();
public:
-
///
/// Gets the global density scale for all foliage instances. The default value is 1. Use values from range 0-1. Lower values decrease amount of foliage instances in-game. Use it to tweak game performance for slower devices.
///
@@ -150,7 +146,6 @@ public:
API_PROPERTY() static void SetGlobalDensityScale(float value);
private:
-
void AddToCluster(ChunkedArray& clusters, FoliageCluster* cluster, FoliageInstance& instance);
#if !FOLIAGE_USE_SINGLE_QUAD_TREE && FOLIAGE_USE_DRAW_CALLS_BATCHING
struct DrawKey
@@ -182,7 +177,6 @@ private:
#endif
public:
-
///
/// Determines if there is an intersection between the current object or any it's child and a ray.
///
@@ -194,7 +188,6 @@ public:
API_FUNCTION() bool Intersects(API_PARAM(Ref) const Ray& ray, API_PARAM(Out) Real& distance, API_PARAM(Out) Vector3& normal, API_PARAM(Out) int32& instanceIndex);
public:
-
// [Actor]
void Draw(RenderContext& renderContext) override;
bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override;
@@ -203,7 +196,6 @@ public:
void OnLayerChanged() override;
protected:
-
// [Actor]
void OnEnable() override;
void OnDisable() override;
diff --git a/Source/Engine/Foliage/FoliageCluster.h b/Source/Engine/Foliage/FoliageCluster.h
index a0e3c9bae..3f39ecc30 100644
--- a/Source/Engine/Foliage/FoliageCluster.h
+++ b/Source/Engine/Foliage/FoliageCluster.h
@@ -13,7 +13,6 @@
class FLAXENGINE_API FoliageCluster
{
public:
-
///
/// The cluster bounds (in world space). Made of subdivided parent node in quad-tree.
///
@@ -45,7 +44,6 @@ public:
Array> Instances;
public:
-
///
/// Initializes this instance.
///
diff --git a/Source/Engine/Foliage/FoliageInstance.h b/Source/Engine/Foliage/FoliageInstance.h
index 145309894..de823358c 100644
--- a/Source/Engine/Foliage/FoliageInstance.h
+++ b/Source/Engine/Foliage/FoliageInstance.h
@@ -12,7 +12,7 @@
///
API_STRUCT(NoPod) struct FLAXENGINE_API FoliageInstance
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(FoliageInstance);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(FoliageInstance);
///
/// The local-space transformation of the mesh relative to the foliage actor.
@@ -55,7 +55,6 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(FoliageInstance);
LightmapEntry Lightmap;
public:
-
bool operator==(const FoliageInstance& v) const
{
return Type == v.Type && Math::NearEqual(Random, v.Random) && Transform == v.Transform;
diff --git a/Source/Engine/Foliage/FoliageType.h b/Source/Engine/Foliage/FoliageType.h
index ac4d1d4b4..937322846 100644
--- a/Source/Engine/Foliage/FoliageType.h
+++ b/Source/Engine/Foliage/FoliageType.h
@@ -43,16 +43,14 @@ API_ENUM() enum class FoliageScalingModes
///
API_CLASS(Sealed, NoSpawn) class FLAXENGINE_API FoliageType : public ScriptingObject, public ISerializable
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(FoliageType);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(FoliageType);
friend Foliage;
private:
-
int8 _isReady : 1;
int8 _canDraw : 1; // Cached and used internally by foliage actor
DrawPass _drawModes; // Cached mask during rendering
public:
-
///
/// Initializes a new instance of the class.
///
@@ -67,7 +65,6 @@ public:
FoliageType& operator=(const FoliageType& other);
public:
-
///
/// The parent foliage actor.
///
@@ -87,7 +84,7 @@ public:
/// The shared model instance entries.
///
ModelInstanceEntries Entries;
-
+
#if !FOLIAGE_USE_SINGLE_QUAD_TREE
///
/// The root cluster. Contains all the instances and it's the starting point of the quad-tree hierarchy. Null if no foliage added. It's read-only.
@@ -101,7 +98,6 @@ public:
#endif
public:
-
///
/// Gets the foliage instance type materials buffer (overrides).
///
@@ -113,7 +109,6 @@ public:
API_PROPERTY() void SetMaterials(const Array& value);
public:
-
///
/// The per-instance cull distance.
///
@@ -215,7 +210,6 @@ public:
API_FIELD() int8 PlacementRandomYaw : 1;
public:
-
///
/// Determines whether this instance is ready (model is loaded).
///
@@ -230,12 +224,10 @@ public:
Float3 GetRandomScale() const;
private:
-
void OnModelChanged();
void OnModelLoaded();
public:
-
// [ISerializable]
void Serialize(SerializeStream& stream, const void* otherObj) override;
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
diff --git a/Source/Engine/Graphics/Async/DefaultGPUTasksExecutor.h b/Source/Engine/Graphics/Async/DefaultGPUTasksExecutor.h
index 5ae993816..6c3fe9f63 100644
--- a/Source/Engine/Graphics/Async/DefaultGPUTasksExecutor.h
+++ b/Source/Engine/Graphics/Async/DefaultGPUTasksExecutor.h
@@ -10,18 +10,15 @@
class DefaultGPUTasksExecutor : public GPUTasksExecutor
{
protected:
-
GPUTasksContext* _context;
public:
-
///
/// Init
///
DefaultGPUTasksExecutor();
public:
-
// [GPUTasksExecutor]
String ToString() const override;
void FrameBegin() override;
diff --git a/Source/Engine/Graphics/Async/GPUTask.h b/Source/Engine/Graphics/Async/GPUTask.h
index 15cb73edc..e4fa29864 100644
--- a/Source/Engine/Graphics/Async/GPUTask.h
+++ b/Source/Engine/Graphics/Async/GPUTask.h
@@ -17,7 +17,6 @@ class GPUTask : public Task
friend GPUTasksContext;
public:
-
///
/// Describes GPU work type
///
@@ -29,7 +28,6 @@ public:
DECLARE_ENUM_4(Result, Ok, Failed, MissingResources, MissingData);
private:
-
///
/// Task type
///
@@ -46,7 +44,6 @@ private:
GPUTasksContext* _context;
protected:
-
///
/// Initializes a new instance of the class.
///
@@ -59,7 +56,6 @@ protected:
}
public:
-
///
/// Gets a task type.
///
@@ -79,7 +75,6 @@ public:
}
public:
-
///
/// Checks if operation is syncing
///
@@ -90,7 +85,6 @@ public:
}
public:
-
///
/// Executes this task.
///
@@ -152,7 +146,6 @@ public:
}
protected:
-
virtual Result run(GPUTasksContext* context) = 0;
virtual void OnSync()
@@ -160,7 +153,6 @@ protected:
}
public:
-
// [Task]
String ToString() const override
{
@@ -168,7 +160,6 @@ public:
}
protected:
-
// [Task]
void Enqueue() override;
diff --git a/Source/Engine/Graphics/Async/GPUTasksContext.h b/Source/Engine/Graphics/Async/GPUTasksContext.h
index 85c2b8ebf..5193f6711 100644
--- a/Source/Engine/Graphics/Async/GPUTasksContext.h
+++ b/Source/Engine/Graphics/Async/GPUTasksContext.h
@@ -15,14 +15,12 @@ class GPUTask;
class GPUTasksContext
{
protected:
-
CriticalSection _locker;
GPUSyncPoint _currentSyncPoint;
Array _tasksDone;
int32 _totalTasksDoneCount;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -35,14 +33,12 @@ public:
~GPUTasksContext();
public:
-
///
/// The GPU commands context used for tasks execution (can be only copy/upload without graphics capabilities on some platforms).
///
GPUContext* GPU;
public:
-
///
/// Gets graphics device handle
///
@@ -79,7 +75,6 @@ public:
void OnCancelSync(GPUTask* task);
public:
-
void OnFrameBegin();
void OnFrameEnd();
diff --git a/Source/Engine/Graphics/Async/GPUTasksExecutor.h b/Source/Engine/Graphics/Async/GPUTasksExecutor.h
index ace5845ff..63c2e3af1 100644
--- a/Source/Engine/Graphics/Async/GPUTasksExecutor.h
+++ b/Source/Engine/Graphics/Async/GPUTasksExecutor.h
@@ -14,18 +14,15 @@ class GPUTask;
class GPUTasksExecutor : public Object
{
protected:
-
Array _contextList;
public:
-
///
/// Destructor
///
virtual ~GPUTasksExecutor();
public:
-
///
/// Sync point event called on begin of the frame
///
@@ -37,7 +34,6 @@ public:
virtual void FrameEnd() = 0;
public:
-
///
/// Gets the context list.
///
@@ -48,6 +44,5 @@ public:
}
protected:
-
GPUTasksContext* createContext();
};
diff --git a/Source/Engine/Graphics/Async/GPUTasksManager.h b/Source/Engine/Graphics/Async/GPUTasksManager.h
index 7da80b7ad..25639a6fb 100644
--- a/Source/Engine/Graphics/Async/GPUTasksManager.h
+++ b/Source/Engine/Graphics/Async/GPUTasksManager.h
@@ -22,7 +22,6 @@ class GPUTasksManager : public Object, public NonCopyable
friend GPUTask;
private:
-
GPUDevice* _device;
GPUTasksExecutor* _executor;
ConcurrentTaskQueue _tasks;
@@ -30,12 +29,10 @@ private:
int32 _bufferIndex;
private:
-
GPUTasksManager(GPUDevice* device);
~GPUTasksManager();
public:
-
///
/// Gets the parent Graphics Device.
///
@@ -70,14 +67,12 @@ public:
}
public:
-
///
/// Clears asynchronous resources loading queue and cancels all tasks.
///
void Dispose();
public:
-
///
/// On begin rendering frame.
///
@@ -89,7 +84,6 @@ public:
void FrameEnd();
public:
-
///
/// Requests work to do. Should be used only by GPUTasksExecutor.
///
@@ -99,7 +93,6 @@ public:
int32 RequestWork(GPUTask** buffer, int32 maxCount);
public:
-
// [Object]
String ToString() const override
{
diff --git a/Source/Engine/Graphics/Async/Tasks/GPUCopyResourceTask.h b/Source/Engine/Graphics/Async/Tasks/GPUCopyResourceTask.h
index 8002cf14d..75f019718 100644
--- a/Source/Engine/Graphics/Async/Tasks/GPUCopyResourceTask.h
+++ b/Source/Engine/Graphics/Async/Tasks/GPUCopyResourceTask.h
@@ -12,12 +12,10 @@
class GPUCopyResourceTask : public GPUTask
{
private:
-
GPUResourceReference _srcResource;
GPUResourceReference _dstResource;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -33,14 +31,12 @@ public:
}
private:
-
void OnResourceUnload(GPUResourceReference* ref)
{
Cancel();
}
public:
-
// [GPUTask]
bool HasReference(Object* resource) const override
{
@@ -48,7 +44,6 @@ public:
}
protected:
-
// [GPUTask]
Result run(GPUTasksContext* context) override
{
diff --git a/Source/Engine/Graphics/Async/Tasks/GPUCopySubresourceTask.h b/Source/Engine/Graphics/Async/Tasks/GPUCopySubresourceTask.h
index 30b2804af..d5998cc9a 100644
--- a/Source/Engine/Graphics/Async/Tasks/GPUCopySubresourceTask.h
+++ b/Source/Engine/Graphics/Async/Tasks/GPUCopySubresourceTask.h
@@ -12,13 +12,11 @@
class GPUCopySubresourceTask : public GPUTask
{
private:
-
GPUResourceReference _srcResource;
GPUResourceReference _dstResource;
uint32 _srcSubresource, _dstSubresource;
public:
-
///
/// Init
///
@@ -38,14 +36,12 @@ public:
}
private:
-
void OnResourceUnload(GPUResourceReference* ref)
{
Cancel();
}
public:
-
// [GPUTask]
bool HasReference(Object* resource) const override
{
@@ -53,7 +49,6 @@ public:
}
protected:
-
// [GPUTask]
Result run(GPUTasksContext* context) override
{
diff --git a/Source/Engine/Graphics/Async/Tasks/GPUUploadBufferTask.h b/Source/Engine/Graphics/Async/Tasks/GPUUploadBufferTask.h
index 190c3c335..5d9bcb997 100644
--- a/Source/Engine/Graphics/Async/Tasks/GPUUploadBufferTask.h
+++ b/Source/Engine/Graphics/Async/Tasks/GPUUploadBufferTask.h
@@ -14,13 +14,11 @@
class GPUUploadBufferTask : public GPUTask
{
protected:
-
BufferReference _buffer;
int32 _offset;
BytesContainer _data;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -42,14 +40,12 @@ public:
}
private:
-
void OnResourceUnload(BufferReference* ref)
{
Cancel();
}
public:
-
// [GPUTask]
bool HasReference(Object* resource) const override
{
@@ -57,7 +53,6 @@ public:
}
protected:
-
// [GPUTask]
Result run(GPUTasksContext* context) override
{
diff --git a/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h b/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h
index 2573505ba..11461b0f3 100644
--- a/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h
+++ b/Source/Engine/Graphics/Async/Tasks/GPUUploadTextureMipTask.h
@@ -14,13 +14,11 @@
class GPUUploadTextureMipTask : public GPUTask
{
protected:
-
GPUTextureReference _texture;
int32 _mipIndex, _rowPitch, _slicePitch;
BytesContainer _data;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -46,14 +44,12 @@ public:
}
private:
-
void OnResourceUnload(GPUTextureReference* ref)
{
Cancel();
}
public:
-
// [GPUTask]
bool HasReference(Object* resource) const override
{
@@ -61,7 +57,6 @@ public:
}
protected:
-
// [GPUTask]
Result run(GPUTasksContext* context) override
{
diff --git a/Source/Engine/Graphics/DynamicBuffer.h b/Source/Engine/Graphics/DynamicBuffer.h
index 9f251ff14..4efade7e0 100644
--- a/Source/Engine/Graphics/DynamicBuffer.h
+++ b/Source/Engine/Graphics/DynamicBuffer.h
@@ -11,7 +11,6 @@
class FLAXENGINE_API DynamicBuffer
{
protected:
-
GPUBuffer* _buffer;
String _name;
uint32 _stride;
@@ -33,7 +32,6 @@ public:
virtual ~DynamicBuffer();
public:
-
///
/// The data container (raw bytes storage).
///
@@ -85,7 +83,7 @@ public:
Data.AddUninitialized(size);
return Data.Get() + start;
}
-
+
///
/// Allocates bytes in the buffer by resizing the buffer for new memory and returns the pointer to the start of the allocated space.
///
@@ -113,7 +111,6 @@ public:
void Dispose();
protected:
-
virtual void InitDesc(GPUBufferDescription& desc, int32 numElements) = 0;
};
@@ -123,7 +120,6 @@ protected:
class FLAXENGINE_API DynamicVertexBuffer : public DynamicBuffer
{
public:
-
///
/// Init
///
@@ -136,7 +132,6 @@ public:
}
protected:
-
// [DynamicBuffer]
void InitDesc(GPUBufferDescription& desc, int32 numElements) override
{
@@ -150,7 +145,6 @@ protected:
class FLAXENGINE_API DynamicIndexBuffer : public DynamicBuffer
{
public:
-
///
/// Init
///
@@ -163,7 +157,6 @@ public:
}
protected:
-
// [DynamicBuffer]
void InitDesc(GPUBufferDescription& desc, int32 numElements) override
{
@@ -180,7 +173,6 @@ private:
bool _isUnorderedAccess;
public:
-
///
/// Init
///
@@ -195,7 +187,6 @@ public:
}
protected:
-
// [DynamicBuffer]
void InitDesc(GPUBufferDescription& desc, int32 numElements) override;
};
@@ -210,7 +201,6 @@ private:
bool _isUnorderedAccess;
public:
-
///
/// Init
///
@@ -221,7 +211,6 @@ public:
DynamicTypedBuffer(uint32 initialCapacity, PixelFormat format, bool isUnorderedAccess = false, const String& name = String::Empty);
protected:
-
// [DynamicBuffer]
void InitDesc(GPUBufferDescription& desc, int32 numElements) override;
};
diff --git a/Source/Engine/Graphics/Enums.h b/Source/Engine/Graphics/Enums.h
index 55398accb..a649d1c77 100644
--- a/Source/Engine/Graphics/Enums.h
+++ b/Source/Engine/Graphics/Enums.h
@@ -362,7 +362,7 @@ API_ENUM() enum class CullMode : byte
///
API_STRUCT() struct BlendingMode
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(BlendingMode);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(BlendingMode);
///
/// Blending mode.
@@ -454,7 +454,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(BlendingMode);
};
public:
-
///
/// Render target blending mode descriptor.
///
@@ -501,11 +500,9 @@ public:
API_FIELD() ColorWrite RenderTargetWriteMask;
public:
-
bool operator==(const BlendingMode& other) const;
public:
-
///
/// Gets the opaque rendering (default). No blending is being performed.
///
diff --git a/Source/Engine/Graphics/GPUAdapter.h b/Source/Engine/Graphics/GPUAdapter.h
index 256ebde5a..e385c5836 100644
--- a/Source/Engine/Graphics/GPUAdapter.h
+++ b/Source/Engine/Graphics/GPUAdapter.h
@@ -16,9 +16,8 @@
///
API_CLASS(NoSpawn, Attributes="HideInEditor") class FLAXENGINE_API GPUAdapter : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDevice);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDevice);
public:
-
GPUAdapter()
: ScriptingObject(SpawnParams(Guid::New(), TypeInitializer))
{
@@ -36,7 +35,6 @@ public:
}
public:
-
///
/// Checks if adapter is valid and returns true if it is.
///
@@ -54,7 +52,6 @@ public:
API_PROPERTY() virtual String GetDescription() const = 0;
public:
-
// Returns true if adapter's vendor is AMD.
API_PROPERTY() FORCE_INLINE bool IsAMD() const
{
diff --git a/Source/Engine/Graphics/GPUBuffer.cpp b/Source/Engine/Graphics/GPUBuffer.cpp
index bf52943db..3aae13789 100644
--- a/Source/Engine/Graphics/GPUBuffer.cpp
+++ b/Source/Engine/Graphics/GPUBuffer.cpp
@@ -271,13 +271,11 @@ bool GPUBuffer::DownloadData(BytesContainer& result)
class BufferDownloadDataTask : public ThreadPoolTask
{
private:
-
BufferReference _buffer;
GPUBuffer* _staging;
BytesContainer& _data;
public:
-
BufferDownloadDataTask(GPUBuffer* buffer, GPUBuffer* staging, BytesContainer& data)
: _buffer(buffer)
, _staging(staging)
@@ -291,7 +289,6 @@ public:
}
public:
-
// [ThreadPoolTask]
bool HasReference(Object* resource) const override
{
@@ -299,7 +296,6 @@ public:
}
protected:
-
// [ThreadPoolTask]
bool Run() override
{
diff --git a/Source/Engine/Graphics/GPUBuffer.h b/Source/Engine/Graphics/GPUBuffer.h
index 349b3cc3b..785be2cc3 100644
--- a/Source/Engine/Graphics/GPUBuffer.h
+++ b/Source/Engine/Graphics/GPUBuffer.h
@@ -15,9 +15,8 @@ typedef DataContainer BytesContainer;
///
API_CLASS(Sealed, NoSpawn) class FLAXENGINE_API GPUBufferView : public GPUResourceView
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUBufferView);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUBufferView);
protected:
-
GPUBufferView();
};
@@ -27,19 +26,17 @@ protected:
///
API_CLASS(Sealed) class FLAXENGINE_API GPUBuffer : public GPUResource
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUBuffer);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUBuffer);
static GPUBuffer* Spawn(const SpawnParams& params);
static GPUBuffer* New();
protected:
-
GPUBufferDescription _desc;
bool _isLocked = false;
GPUBuffer();
public:
-
///
/// Gets a value indicating whether this buffer has been allocated.
///
@@ -135,7 +132,6 @@ public:
API_FUNCTION() virtual GPUBufferView* View() const = 0;
public:
-
///
/// Creates new buffer.
///
@@ -163,7 +159,6 @@ public:
API_FUNCTION() bool Resize(uint32 newSize);
public:
-
///
/// Stops current thread execution to gather buffer data from the GPU. Cannot be called from main thread if the buffer is not a dynamic nor staging readback.
///
@@ -205,18 +200,15 @@ public:
API_FUNCTION() virtual void Unmap() = 0;
protected:
-
virtual bool OnInit() = 0;
public:
-
// [GPUResource]
String ToString() const override;
ResourceType GetResourceType() const final override;
ObjectType GetObjectType() const final override;
protected:
-
// [GPUResource]
void OnReleaseGPU() override;
};
diff --git a/Source/Engine/Graphics/GPUBufferDescription.h b/Source/Engine/Graphics/GPUBufferDescription.h
index fd99f62e6..c19ee614b 100644
--- a/Source/Engine/Graphics/GPUBufferDescription.h
+++ b/Source/Engine/Graphics/GPUBufferDescription.h
@@ -78,7 +78,7 @@ DECLARE_ENUM_OPERATORS(GPUBufferFlags);
///
API_STRUCT() struct FLAXENGINE_API GPUBufferDescription
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(GPUBufferDescription);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(GPUBufferDescription);
///
/// The buffer total size.
@@ -111,7 +111,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(GPUBufferDescription);
API_FIELD() GPUResourceUsage Usage;
public:
-
///
/// Gets the number elements in the buffer.
///
@@ -137,7 +136,6 @@ public:
}
public:
-
///
/// Creates the buffer description.
///
@@ -334,7 +332,6 @@ public:
}
public:
-
void Clear();
GPUBufferDescription ToStagingUpload() const;
GPUBufferDescription ToStagingReadback() const;
@@ -342,7 +339,6 @@ public:
String ToString() const;
public:
-
FORCE_INLINE bool operator==(const GPUBufferDescription& other) const
{
return Equals(other);
diff --git a/Source/Engine/Graphics/GPUContext.h b/Source/Engine/Graphics/GPUContext.h
index 8639d3924..7c8b90a71 100644
--- a/Source/Engine/Graphics/GPUContext.h
+++ b/Source/Engine/Graphics/GPUContext.h
@@ -29,7 +29,7 @@ class GPUBufferView;
///
API_STRUCT() struct GPUDispatchIndirectArgs
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDispatchIndirectArgs);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDispatchIndirectArgs);
///
/// The X dimension of dispatch size.
@@ -52,7 +52,7 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDispatchIndirectArgs);
///
API_STRUCT() struct GPUDrawIndirectArgs
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDrawIndirectArgs);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDrawIndirectArgs);
///
/// The number of vertices to draw for each instance.
@@ -80,7 +80,7 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDrawIndirectArgs);
///
API_STRUCT() struct GPUDrawIndexedIndirectArgs
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDrawIndexedIndirectArgs);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDrawIndexedIndirectArgs);
///
/// The number of indices to draw for each instance.
@@ -113,18 +113,15 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDrawIndexedIndirectArgs);
///
API_CLASS(Sealed, NoSpawn) class FLAXENGINE_API GPUContext : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUContext);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUContext);
private:
-
GPUDevice* _device;
protected:
-
double _lastRenderTime = -1;
GPUContext(GPUDevice* device);
public:
-
///
/// Gets the graphics device.
///
@@ -134,7 +131,6 @@ public:
}
public:
-
///
/// Begins new frame and enters commands collecting mode.
///
@@ -146,7 +142,6 @@ public:
virtual void FrameEnd();
public:
-
#if GPU_ALLOW_PROFILE_EVENTS
///
@@ -167,7 +162,6 @@ public:
#endif
public:
-
///
/// Gets the native pointer to the underlying graphics device context. It's a low-level platform-specific handle.
///
@@ -180,7 +174,6 @@ public:
virtual bool IsDepthBufferBinded() = 0;
public:
-
///
/// Clears texture surface with a color. Supports volumetric textures and texture arrays (including cube textures).
///
@@ -224,7 +217,6 @@ public:
virtual void ClearUA(GPUTexture* texture, const Float4& value) = 0;
public:
-
///
/// Updates the buffer data.
///
@@ -298,7 +290,6 @@ public:
API_FUNCTION() virtual void CopySubresource(GPUResource* dstResource, uint32 dstSubresource, GPUResource* srcResource, uint32 srcSubresource) = 0;
public:
-
///
/// Unbinds all the render targets and flushes the change with the driver (used to prevent driver detection of resource hazards, eg. when down-scaling the texture).
///
@@ -325,7 +316,6 @@ public:
API_FUNCTION() virtual void SetRenderTarget(GPUTextureView* depthBuffer, const Span& rts) = 0;
public:
-
///
/// Unbinds all shader resource slots and flushes the change with the driver (used to prevent driver detection of resource hazards, eg. when down-scaling the texture).
///
@@ -417,7 +407,6 @@ public:
API_FUNCTION() virtual void BindSampler(int32 slot, GPUSampler* sampler) = 0;
public:
-
///
/// Updates the constant buffer data.
///
@@ -426,7 +415,6 @@ public:
API_FUNCTION() virtual void UpdateCB(GPUConstantBuffer* cb, const void* data) = 0;
public:
-
///
/// Executes a command list from a thread group.
///
@@ -534,7 +522,6 @@ public:
API_FUNCTION() virtual void DrawIndexedInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs) = 0;
public:
-
///
/// Sets the rendering viewport and scissor rectangle.
///
@@ -583,7 +570,6 @@ public:
API_FUNCTION() virtual void SetScissor(API_PARAM(Ref) const Rectangle& scissorRect) = 0;
public:
-
///
/// Sets the graphics pipeline state.
///
diff --git a/Source/Engine/Graphics/GPUDevice.h b/Source/Engine/Graphics/GPUDevice.h
index 9752c9755..f4b8e88ae 100644
--- a/Source/Engine/Graphics/GPUDevice.h
+++ b/Source/Engine/Graphics/GPUDevice.h
@@ -31,9 +31,8 @@ class MaterialBase;
///
API_CLASS(Sealed, NoSpawn) class FLAXENGINE_API GPUDevice : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDevice);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUDevice);
public:
-
///
/// Graphics Device states that describe its lifetime.
///
@@ -44,7 +43,7 @@ public:
///
API_STRUCT() struct VideoOutputMode
{
- DECLARE_SCRIPTING_TYPE_NO_SPAWN(VideoOutputMode);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(VideoOutputMode);
///
/// The resolution width (in pixel).
@@ -68,7 +67,6 @@ public:
API_FIELD(ReadOnly) static GPUDevice* Instance;
protected:
-
// State
DeviceState _state;
bool _isRendering;
@@ -83,7 +81,6 @@ protected:
PrivateData* _res;
protected:
-
///
/// Initializes a new instance of the class.
///
@@ -92,14 +89,12 @@ protected:
GPUDevice(RendererType type, ShaderProfile profile);
public:
-
///
/// Finalizes an instance of the class.
///
virtual ~GPUDevice();
public:
-
///
/// The graphics device locking mutex.
///
@@ -116,7 +111,6 @@ public:
GPUTasksManager TasksManager;
public:
-
///
/// The total amount of graphics memory in bytes.
///
@@ -158,7 +152,6 @@ public:
}
public:
-
///
/// Gets current device state.
///
@@ -268,7 +261,6 @@ public:
GPUBuffer* GetFullscreenTriangleVB() const;
public:
-
///
/// Init device resources
///
@@ -303,7 +295,6 @@ public:
virtual void WaitForGPU() = 0;
protected:
-
virtual void preDispose();
///
@@ -327,7 +318,6 @@ protected:
virtual void RenderEnd();
public:
-
///
/// Creates the texture.
///
diff --git a/Source/Engine/Graphics/GPULimits.h b/Source/Engine/Graphics/GPULimits.h
index a45415077..c3c278422 100644
--- a/Source/Engine/Graphics/GPULimits.h
+++ b/Source/Engine/Graphics/GPULimits.h
@@ -184,7 +184,7 @@ DECLARE_ENUM_OPERATORS(FormatSupport);
///
API_STRUCT() struct FormatFeatures
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(FormatFeatures);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(FormatFeatures);
///
/// Gets the maximum MSAA sample count for a particular .
@@ -218,7 +218,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(FormatFeatures);
///
API_STRUCT() struct GPULimits
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(GPULimits);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(GPULimits);
///
/// True if device supports Compute shaders.
diff --git a/Source/Engine/Graphics/GPUPipelineState.h b/Source/Engine/Graphics/GPUPipelineState.h
index c4d337161..497548e00 100644
--- a/Source/Engine/Graphics/GPUPipelineState.h
+++ b/Source/Engine/Graphics/GPUPipelineState.h
@@ -12,18 +12,17 @@
///
API_CLASS(Sealed) class FLAXENGINE_API GPUPipelineState : public GPUResource
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUPipelineState);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUPipelineState);
static GPUPipelineState* Spawn(const SpawnParams& params);
static GPUPipelineState* New();
public:
-
///
/// Pipeline state description
///
API_STRUCT() struct Description
{
- DECLARE_SCRIPTING_TYPE_NO_SPAWN(Description);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Description);
///
/// Enable/disable depth write
@@ -91,7 +90,6 @@ public:
API_FIELD() BlendingMode BlendMode;
public:
-
///
/// Default description
///
@@ -109,11 +107,9 @@ public:
};
protected:
-
ShaderBindings _meta;
public:
-
#if BUILD_DEBUG
///
/// The description of the pipeline state cached on creation in debug builds. Can be used to help with rendering crashes or issues and validation.
@@ -125,7 +121,6 @@ public:
#endif
public:
-
///
/// Gets constant buffers usage mask (each set bit marks usage of the constant buffer at the bit index slot). Combined from all the used shader stages.
///
@@ -151,7 +146,6 @@ public:
}
public:
-
///
/// Returns true if pipeline state is valid and ready to use
///
diff --git a/Source/Engine/Graphics/GPUPipelineStatePermutations.h b/Source/Engine/Graphics/GPUPipelineStatePermutations.h
index a0bee7534..ecccd8baf 100644
--- a/Source/Engine/Graphics/GPUPipelineStatePermutations.h
+++ b/Source/Engine/Graphics/GPUPipelineStatePermutations.h
@@ -10,11 +10,9 @@ template
class GPUPipelineStatePermutations
{
public:
-
GPUPipelineState* States[Size];
public:
-
GPUPipelineStatePermutations()
{
Platform::MemoryClear(States, sizeof(States));
@@ -26,7 +24,6 @@ public:
}
public:
-
bool IsValid() const
{
for (int i = 0; i < Size; i++)
@@ -51,7 +48,6 @@ public:
}
public:
-
void CreatePipelineStates()
{
for (int i = 0; i < Size; i++)
@@ -87,11 +83,9 @@ template
class GPUPipelineStatePermutationsPs : public GPUPipelineStatePermutations
{
public:
-
typedef GPUPipelineStatePermutations Base;
public:
-
GPUPipelineStatePermutationsPs()
{
}
@@ -101,7 +95,6 @@ public:
}
public:
-
bool Create(GPUPipelineState::Description& desc, GPUShader* shader, const StringAnsiView& psName)
{
for (int i = 0; i < Size; i++)
@@ -121,11 +114,9 @@ template
class ComputeShaderPermutation
{
public:
-
GPUShaderProgramCS* Shaders[Size];
public:
-
ComputeShaderPermutation()
{
Platform::MemoryClear(Shaders, sizeof(Shaders));
@@ -136,14 +127,12 @@ public:
}
public:
-
FORCE_INLINE GPUShaderProgramCS* Get(const int index) const
{
return Shaders[index];
}
public:
-
void Clear()
{
Platform::MemoryClear(Shaders, sizeof(Shaders));
diff --git a/Source/Engine/Graphics/GPUResource.h b/Source/Engine/Graphics/GPUResource.h
index 1d57a0766..19388999d 100644
--- a/Source/Engine/Graphics/GPUResource.h
+++ b/Source/Engine/Graphics/GPUResource.h
@@ -17,9 +17,8 @@
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API GPUResource : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUResource);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUResource);
public:
-
///
/// GPU Resources types.
///
@@ -31,7 +30,6 @@ public:
DECLARE_ENUM_3(ObjectType, Texture, Buffer, Other);
protected:
-
uint64 _memoryUsage = 0;
public:
@@ -54,7 +52,6 @@ public:
virtual ~GPUResource();
public:
-
// Points to the cache used by the resource for the resource visibility/usage detection. Written during rendering when resource is used.
double LastRenderTime = -1;
@@ -64,7 +61,6 @@ public:
Action Releasing;
public:
-
///
/// Gets the resource type.
///
@@ -100,14 +96,12 @@ public:
virtual void OnDeviceDispose();
protected:
-
///
/// Releases GPU resource data (implementation).
///
virtual void OnReleaseGPU();
public:
-
// [ScriptingObject]
String ToString() const override;
void OnDeleteObject() override;
@@ -123,17 +117,14 @@ template
class GPUResourceBase : public BaseType
{
protected:
-
DeviceType* _device;
private:
-
#if GPU_ENABLE_RESOURCE_NAMING
String _name;
#endif
public:
-
///
/// Initializes a new instance of the class.
///
@@ -158,7 +149,6 @@ public:
}
public:
-
///
/// Gets the graphics device.
///
@@ -168,7 +158,6 @@ public:
}
public:
-
// [GPUResource]
#if GPU_ENABLE_RESOURCE_NAMING
String GetName() const override
@@ -188,7 +177,7 @@ public:
///
API_CLASS(Abstract, NoSpawn, Attributes="HideInEditor") class FLAXENGINE_API GPUResourceView : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUResourceView);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUResourceView);
protected:
static double DummyLastRenderTime;
@@ -199,7 +188,6 @@ protected:
}
public:
-
// Points to the cache used by the resource for the resource visibility/usage detection. Written during rendering when resource view is used.
double* LastRenderTime;
diff --git a/Source/Engine/Graphics/GPUResourceProperty.h b/Source/Engine/Graphics/GPUResourceProperty.h
index b0506ab7e..c0376819e 100644
--- a/Source/Engine/Graphics/GPUResourceProperty.h
+++ b/Source/Engine/Graphics/GPUResourceProperty.h
@@ -12,23 +12,19 @@ template
class GPUResourceProperty
{
private:
-
T* _resource;
private:
-
// Disable copy actions
GPUResourceProperty(const GPUResourceProperty& other) = delete;
public:
-
///
/// Action fired when resource gets unloaded (reference gets cleared bu async tasks should stop execution).
///
Delegate OnUnload;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -62,7 +58,6 @@ public:
}
public:
-
FORCE_INLINE bool operator==(T* other) const
{
return Get() == other;
@@ -147,7 +142,6 @@ public:
}
public:
-
///
/// Set resource
///
@@ -183,7 +177,6 @@ public:
}
private:
-
void onResourceUnload()
{
if (_resource)
diff --git a/Source/Engine/Graphics/GPUResourceState.h b/Source/Engine/Graphics/GPUResourceState.h
index dd9951378..f4c07897d 100644
--- a/Source/Engine/Graphics/GPUResourceState.h
+++ b/Source/Engine/Graphics/GPUResourceState.h
@@ -12,7 +12,6 @@ template
class GPUResourceState
{
private:
-
///
/// The whole resource state (used only if _allSubresourcesSame is 1).
///
@@ -30,7 +29,6 @@ private:
Array _subresourceState;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -41,7 +39,6 @@ public:
}
public:
-
void Initialize(uint32 subresourceCount, StateType initialState, bool usePerSubresourceTracking)
{
ASSERT(_subresourceState.IsEmpty() && subresourceCount > 0);
diff --git a/Source/Engine/Graphics/GPUResourcesCollection.h b/Source/Engine/Graphics/GPUResourcesCollection.h
index c37a645d7..e285cbea3 100644
--- a/Source/Engine/Graphics/GPUResourcesCollection.h
+++ b/Source/Engine/Graphics/GPUResourcesCollection.h
@@ -15,12 +15,10 @@ class StringBuilder;
class GPUResourcesCollection
{
private:
-
CriticalSection _locker;
Array _collection;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -37,7 +35,6 @@ public:
}
public:
-
///
/// Gets the total memory usage (in bytes).
///
@@ -60,7 +57,6 @@ public:
void DumpToLog(StringBuilder& output) const;
public:
-
///
/// Adds the specified resource to the collection.
///
diff --git a/Source/Engine/Graphics/GPUSwapChain.cpp b/Source/Engine/Graphics/GPUSwapChain.cpp
index 1b0d29dfc..1409590e3 100644
--- a/Source/Engine/Graphics/GPUSwapChain.cpp
+++ b/Source/Engine/Graphics/GPUSwapChain.cpp
@@ -10,7 +10,6 @@ class GPUSwapChainDownloadTask : public Task
friend GPUSwapChain;
public:
-
GPUSwapChain* SwapChain;
GPUTexture* Texture;
diff --git a/Source/Engine/Graphics/GPUSwapChain.h b/Source/Engine/Graphics/GPUSwapChain.h
index 803603150..59dc760eb 100644
--- a/Source/Engine/Graphics/GPUSwapChain.h
+++ b/Source/Engine/Graphics/GPUSwapChain.h
@@ -17,7 +17,6 @@ class Task;
class FLAXENGINE_API GPUSwapChain : public GPUResource
{
protected:
-
int32 _width = 0;
int32 _height = 0;
uint64 _presentCount = 0;
@@ -30,7 +29,6 @@ protected:
}
public:
-
///
/// Gets the linked window.
///
@@ -123,7 +121,6 @@ public:
}
public:
-
///
/// Creates GPU async task that will gather render target data from the GPU.
///
@@ -132,7 +129,6 @@ public:
virtual Task* DownloadDataAsync(TextureData& result);
public:
-
///
/// Begin task rendering.
///
@@ -162,7 +158,6 @@ public:
virtual bool Resize(int32 width, int32 height) = 0;
public:
-
// [GPUResource]
ResourceType GetResourceType() const final override
{
diff --git a/Source/Engine/Graphics/GPUTimerQuery.h b/Source/Engine/Graphics/GPUTimerQuery.h
index 04466d09c..e4763ac4f 100644
--- a/Source/Engine/Graphics/GPUTimerQuery.h
+++ b/Source/Engine/Graphics/GPUTimerQuery.h
@@ -12,7 +12,6 @@
class FLAXENGINE_API GPUTimerQuery : public GPUResource
{
public:
-
///
/// Finalizes an instance of the class.
///
@@ -21,7 +20,6 @@ public:
}
public:
-
///
/// Starts the counter.
///
@@ -45,7 +43,6 @@ public:
virtual float GetResult() = 0;
public:
-
// [GPUResource]
String ToString() const override
{
diff --git a/Source/Engine/Graphics/Graphics.cpp b/Source/Engine/Graphics/Graphics.cpp
index f1baee478..8860f6bed 100644
--- a/Source/Engine/Graphics/Graphics.cpp
+++ b/Source/Engine/Graphics/Graphics.cpp
@@ -39,7 +39,6 @@ extern GPUDevice* CreateGPUDevicePS5();
class GraphicsService : public EngineService
{
public:
-
GraphicsService()
: EngineService(TEXT("Graphics"), -40)
{
diff --git a/Source/Engine/Graphics/Graphics.h b/Source/Engine/Graphics/Graphics.h
index 01fa60749..bce51aa2f 100644
--- a/Source/Engine/Graphics/Graphics.h
+++ b/Source/Engine/Graphics/Graphics.h
@@ -10,9 +10,8 @@
///
API_CLASS(Static) class FLAXENGINE_API Graphics
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Graphics);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Graphics);
public:
-
///
/// Enables rendering synchronization with the refresh rate of the display device to avoid "tearing" artifacts.
///
@@ -64,7 +63,6 @@ public:
API_FIELD() static Quality GIQuality;
public:
-
///
/// Disposes the device.
///
diff --git a/Source/Engine/Graphics/Materials/DecalMaterialShader.h b/Source/Engine/Graphics/Materials/DecalMaterialShader.h
index d5d51998d..373baa089 100644
--- a/Source/Engine/Graphics/Materials/DecalMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/DecalMaterialShader.h
@@ -10,7 +10,6 @@
class DecalMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
GPUPipelineState* Inside = nullptr;
@@ -24,11 +23,9 @@ private:
};
private:
-
Cache _cache;
public:
-
///
/// Init
///
@@ -39,14 +36,12 @@ public:
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
void Bind(BindParameters& params) override;
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/DeferredMaterialShader.h b/Source/Engine/Graphics/Materials/DeferredMaterialShader.h
index f6853c8d8..3e379ea01 100644
--- a/Source/Engine/Graphics/Materials/DeferredMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/DeferredMaterialShader.h
@@ -10,7 +10,6 @@
class DeferredMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
PipelineStateCache Default;
@@ -62,19 +61,16 @@ private:
};
private:
-
Cache _cache;
Cache _cacheInstanced;
public:
-
DeferredMaterialShader(const StringView& name)
: MaterialShader(name)
{
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
bool CanUseLightmap() const override;
@@ -83,7 +79,6 @@ public:
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/DeformableMaterialShader.h b/Source/Engine/Graphics/Materials/DeformableMaterialShader.h
index 5a845d4dc..26031f2ea 100644
--- a/Source/Engine/Graphics/Materials/DeformableMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/DeformableMaterialShader.h
@@ -10,7 +10,6 @@
class DeformableMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
PipelineStateCache Default;
@@ -48,26 +47,22 @@ private:
};
private:
-
Cache _cache;
DrawPass _drawModes = DrawPass::None;
public:
-
DeformableMaterialShader(const StringView& name)
: MaterialShader(name)
{
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
void Bind(BindParameters& params) override;
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/ForwardMaterialShader.h b/Source/Engine/Graphics/Materials/ForwardMaterialShader.h
index 6e823baf3..25479b872 100644
--- a/Source/Engine/Graphics/Materials/ForwardMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/ForwardMaterialShader.h
@@ -10,7 +10,6 @@
class ForwardMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
PipelineStateCache Default;
@@ -55,13 +54,11 @@ private:
};
private:
-
Cache _cache;
Cache _cacheInstanced;
DrawPass _drawModes = DrawPass::None;
public:
-
///
/// Init
///
@@ -72,7 +69,6 @@ public:
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
bool CanUseInstancing(InstancingHandler& handler) const override;
@@ -80,7 +76,6 @@ public:
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/GUIMaterialShader.h b/Source/Engine/Graphics/Materials/GUIMaterialShader.h
index 38126fa30..29ebe1eaf 100644
--- a/Source/Engine/Graphics/Materials/GUIMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/GUIMaterialShader.h
@@ -10,7 +10,6 @@
class GUIMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
GPUPipelineState* Depth = nullptr;
@@ -24,11 +23,9 @@ private:
};
private:
-
Cache _cache;
public:
-
///
/// Init
///
@@ -39,13 +36,11 @@ public:
}
public:
-
// [MaterialShader]
void Bind(BindParameters& params) override;
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/IMaterial.h b/Source/Engine/Graphics/Materials/IMaterial.h
index c59aebb58..bd3337876 100644
--- a/Source/Engine/Graphics/Materials/IMaterial.h
+++ b/Source/Engine/Graphics/Materials/IMaterial.h
@@ -20,7 +20,6 @@ struct DrawCall;
class FLAXENGINE_API IMaterial
{
public:
-
///
/// Gets the material info, structure which describes material surface.
///
@@ -134,7 +133,6 @@ public:
}
public:
-
///
/// Settings for the material binding to the graphics pipeline.
///
diff --git a/Source/Engine/Graphics/Materials/MaterialInfo.h b/Source/Engine/Graphics/Materials/MaterialInfo.h
index 98f9bad74..a3de6be0b 100644
--- a/Source/Engine/Graphics/Materials/MaterialInfo.h
+++ b/Source/Engine/Graphics/Materials/MaterialInfo.h
@@ -446,7 +446,7 @@ struct MaterialInfo8
///
API_STRUCT() struct FLAXENGINE_API MaterialInfo
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(MaterialInfo);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(MaterialInfo);
///
/// The material shader domain.
diff --git a/Source/Engine/Graphics/Materials/MaterialParams.cpp b/Source/Engine/Graphics/Materials/MaterialParams.cpp
index ce695c26e..762ed1bb9 100644
--- a/Source/Engine/Graphics/Materials/MaterialParams.cpp
+++ b/Source/Engine/Graphics/Materials/MaterialParams.cpp
@@ -406,7 +406,9 @@ void MaterialParameter::Bind(BindMeta& meta) const
{
case MaterialSceneTextures::SceneDepth:
view = meta.CanSampleDepth
- ? meta.Buffers->DepthBuffer->GetDescription().Flags & GPUTextureFlags::ReadOnlyDepthView ? meta.Buffers->DepthBuffer->ViewReadOnlyDepth() : meta.Buffers->DepthBuffer->View()
+ ? meta.Buffers->DepthBuffer->GetDescription().Flags & GPUTextureFlags::ReadOnlyDepthView
+ ? meta.Buffers->DepthBuffer->ViewReadOnlyDepth()
+ : meta.Buffers->DepthBuffer->View()
: GPUDevice::Instance->GetDefaultWhiteTexture()->View();
break;
case MaterialSceneTextures::AmbientOcclusion:
diff --git a/Source/Engine/Graphics/Materials/MaterialParams.h b/Source/Engine/Graphics/Materials/MaterialParams.h
index 7759cf0ea..1b68694d2 100644
--- a/Source/Engine/Graphics/Materials/MaterialParams.h
+++ b/Source/Engine/Graphics/Materials/MaterialParams.h
@@ -174,11 +174,10 @@ struct SerializedMaterialParam
///
API_CLASS(NoSpawn) class FLAXENGINE_API MaterialParameter : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(MaterialParameter, ScriptingObject);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(MaterialParameter, ScriptingObject);
friend MaterialParams;
friend MaterialInstance;
private:
-
Guid _paramId;
MaterialParameterType _type = MaterialParameterType::Invalid;
bool _isPublic;
@@ -202,7 +201,6 @@ private:
String _name;
public:
-
MaterialParameter(const MaterialParameter& other)
: MaterialParameter()
{
@@ -220,7 +218,6 @@ public:
}
public:
-
///
/// Gets the parameter ID (not the parameter instance Id but the original parameter ID).
///
@@ -286,7 +283,6 @@ public:
}
public:
-
///
/// Gets the value of the parameter.
///
@@ -300,7 +296,6 @@ public:
API_PROPERTY() void SetValue(const Variant& value);
public:
-
///
/// The material parameter binding metadata.
///
@@ -346,11 +341,9 @@ public:
bool HasContentLoaded() const;
private:
-
void clone(const MaterialParameter* param);
public:
-
bool operator==(const MaterialParameter& other) const;
// [Object]
@@ -364,25 +357,21 @@ class FLAXENGINE_API MaterialParams : public Array
{
friend MaterialInstance;
private:
-
int32 _versionHash = 0;
public:
-
MaterialParameter* Get(const Guid& id);
MaterialParameter* Get(const StringView& name);
int32 Find(const Guid& id);
int32 Find(const StringView& name);
public:
-
///
/// Gets the parameters version hash. Every time the parameters are modified (loaded, edited, etc.) the hash changes. Can be used to sync instanced parameters collection.
///
int32 GetVersionHash() const;
public:
-
///
/// Binds the parameters to the pipeline.
///
@@ -429,7 +418,6 @@ public:
static void Save(BytesContainer& data, const Array* params);
public:
-
#if USE_EDITOR
///
@@ -443,6 +431,5 @@ public:
bool HasContentLoaded() const;
private:
-
void UpdateHash();
};
diff --git a/Source/Engine/Graphics/Materials/MaterialShader.cpp b/Source/Engine/Graphics/Materials/MaterialShader.cpp
index d1267c27d..a81293430 100644
--- a/Source/Engine/Graphics/Materials/MaterialShader.cpp
+++ b/Source/Engine/Graphics/Materials/MaterialShader.cpp
@@ -112,21 +112,18 @@ MaterialShader* MaterialShader::Create(const StringView& name, MemoryReadStream&
class DummyMaterial : public MaterialShader
{
public:
-
DummyMaterial()
: MaterialShader(String::Empty)
{
}
public:
-
// [Material]
void Bind(BindParameters& params) override
{
}
protected:
-
// [Material]
bool Load() override
{
diff --git a/Source/Engine/Graphics/Materials/MaterialShader.h b/Source/Engine/Graphics/Materials/MaterialShader.h
index 5f735795d..6a934644c 100644
--- a/Source/Engine/Graphics/Materials/MaterialShader.h
+++ b/Source/Engine/Graphics/Materials/MaterialShader.h
@@ -23,7 +23,6 @@ class MemoryReadStream;
class MaterialShader : public IMaterial
{
protected:
-
struct PipelineStateCache
{
GPUPipelineState* PS[6];
@@ -57,7 +56,6 @@ protected:
};
protected:
-
bool _isLoaded;
GPUShader* _shader;
GPUConstantBuffer* _cb;
@@ -65,7 +63,6 @@ protected:
MaterialInfo _info;
protected:
-
///
/// Init
///
@@ -73,14 +70,12 @@ protected:
MaterialShader(const StringView& name);
public:
-
///
/// Finalizes an instance of the class.
///
virtual ~MaterialShader();
public:
-
///
/// Creates and loads the material from the data.
///
@@ -104,12 +99,10 @@ public:
virtual void Unload();
protected:
-
bool Load(MemoryReadStream& shaderCacheStream, const MaterialInfo& info);
virtual bool Load() = 0;
public:
-
// [IMaterial]
const MaterialInfo& GetInfo() const override;
GPUShader* GetShader() const override;
diff --git a/Source/Engine/Graphics/Materials/ParticleMaterialShader.cpp b/Source/Engine/Graphics/Materials/ParticleMaterialShader.cpp
index f802ef523..43c8c2f19 100644
--- a/Source/Engine/Graphics/Materials/ParticleMaterialShader.cpp
+++ b/Source/Engine/Graphics/Materials/ParticleMaterialShader.cpp
@@ -136,19 +136,19 @@ void ParticleMaterialShader::Bind(BindParameters& params)
PipelineStateCache* psCache = nullptr;
switch (drawCall.Particle.Module->TypeID)
{
- // Sprite Rendering
+ // Sprite Rendering
case 400:
{
psCache = _cacheSprite.GetPS(view.Pass);
break;
}
- // Model Rendering
+ // Model Rendering
case 403:
{
psCache = _cacheModel.GetPS(view.Pass);
break;
}
- // Ribbon Rendering
+ // Ribbon Rendering
case 404:
{
psCache = _cacheRibbon.GetPS(view.Pass);
diff --git a/Source/Engine/Graphics/Materials/ParticleMaterialShader.h b/Source/Engine/Graphics/Materials/ParticleMaterialShader.h
index 762ca0b7e..b3b04d541 100644
--- a/Source/Engine/Graphics/Materials/ParticleMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/ParticleMaterialShader.h
@@ -10,7 +10,6 @@
class ParticleMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
PipelineStateCache Default;
@@ -51,7 +50,6 @@ private:
};
private:
-
Cache _cacheSprite;
Cache _cacheModel;
Cache _cacheRibbon;
@@ -59,7 +57,6 @@ private:
DrawPass _drawModes = DrawPass::None;
public:
-
///
/// Init
///
@@ -70,14 +67,12 @@ public:
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
void Bind(BindParameters& params) override;
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/PostFxMaterialShader.h b/Source/Engine/Graphics/Materials/PostFxMaterialShader.h
index def6fe82b..7e5c53878 100644
--- a/Source/Engine/Graphics/Materials/PostFxMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/PostFxMaterialShader.h
@@ -10,7 +10,6 @@
class PostFxMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
GPUPipelineState* Default = nullptr;
@@ -22,11 +21,9 @@ private:
};
private:
-
Cache _cache;
public:
-
///
/// Init
///
@@ -37,13 +34,11 @@ public:
}
public:
-
// [MaterialShader]
void Bind(BindParameters& params) override;
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/TerrainMaterialShader.h b/Source/Engine/Graphics/Materials/TerrainMaterialShader.h
index a4523f170..1faedc72d 100644
--- a/Source/Engine/Graphics/Materials/TerrainMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/TerrainMaterialShader.h
@@ -10,7 +10,6 @@
class TerrainMaterialShader : public MaterialShader
{
private:
-
struct Cache
{
PipelineStateCache Default;
@@ -49,11 +48,9 @@ private:
};
private:
-
Cache _cache;
public:
-
///
/// Init
///
@@ -64,7 +61,6 @@ public:
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
bool CanUseLightmap() const override;
@@ -72,7 +68,6 @@ public:
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Materials/VolumeParticleMaterialShader.h b/Source/Engine/Graphics/Materials/VolumeParticleMaterialShader.h
index c94a5934a..7a4a3fa91 100644
--- a/Source/Engine/Graphics/Materials/VolumeParticleMaterialShader.h
+++ b/Source/Engine/Graphics/Materials/VolumeParticleMaterialShader.h
@@ -10,11 +10,9 @@
class VolumeParticleMaterialShader : public MaterialShader
{
private:
-
GPUPipelineState* _psVolumetricFog = nullptr;
public:
-
///
/// Init
///
@@ -25,14 +23,12 @@ public:
}
public:
-
// [MaterialShader]
DrawPass GetDrawModes() const override;
void Bind(BindParameters& params) override;
void Unload() override;
protected:
-
// [MaterialShader]
bool Load() override;
};
diff --git a/Source/Engine/Graphics/Models/BlendShape.h b/Source/Engine/Graphics/Models/BlendShape.h
index 69ab572e9..b63b0081f 100644
--- a/Source/Engine/Graphics/Models/BlendShape.h
+++ b/Source/Engine/Graphics/Models/BlendShape.h
@@ -46,7 +46,6 @@ struct TIsPODType
class BlendShape
{
public:
-
///
/// The name of the blend shape.
///
@@ -84,14 +83,12 @@ public:
class BlendShapesInstance
{
public:
-
///
/// The runtime data for blend shapes used for on a mesh.
///
class MeshInstance
{
public:
-
bool IsUsed;
bool IsDirty;
uint32 DirtyMinVertexIndex;
@@ -103,7 +100,6 @@ public:
};
public:
-
///
/// The blend shapes weights (pair of blend shape name and the weight).
///
@@ -120,7 +116,6 @@ public:
Dictionary Meshes;
public:
-
///
/// Finalizes an instance of the class.
///
diff --git a/Source/Engine/Graphics/Models/CollisionProxy.h b/Source/Engine/Graphics/Models/CollisionProxy.h
index 6ed98a644..346eb8e25 100644
--- a/Source/Engine/Graphics/Models/CollisionProxy.h
+++ b/Source/Engine/Graphics/Models/CollisionProxy.h
@@ -13,7 +13,6 @@
class FLAXENGINE_API CollisionProxy
{
public:
-
struct CollisionTriangle
{
Float3 V0, V1, V2;
@@ -25,7 +24,6 @@ public:
Array Triangles;
public:
-
FORCE_INLINE bool HasData() const
{
return Triangles.HasItems();
diff --git a/Source/Engine/Graphics/Models/MaterialSlot.h b/Source/Engine/Graphics/Models/MaterialSlot.h
index 422c72cb6..9e60efaae 100644
--- a/Source/Engine/Graphics/Models/MaterialSlot.h
+++ b/Source/Engine/Graphics/Models/MaterialSlot.h
@@ -12,7 +12,7 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API MaterialSlot : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(MaterialSlot, ScriptingObject);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(MaterialSlot, ScriptingObject);
///
/// The material to use for rendering.
@@ -30,7 +30,6 @@ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(MaterialSlot, ScriptingObject);
API_FIELD() String Name;
public:
-
MaterialSlot(const MaterialSlot& other)
: MaterialSlot()
{
diff --git a/Source/Engine/Graphics/Models/Mesh.h b/Source/Engine/Graphics/Models/Mesh.h
index 151620d96..9d1dd01e0 100644
--- a/Source/Engine/Graphics/Models/Mesh.h
+++ b/Source/Engine/Graphics/Models/Mesh.h
@@ -20,9 +20,8 @@ class GPUBuffer;
///
API_CLASS(NoSpawn) class FLAXENGINE_API Mesh : public MeshBase
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(Mesh, MeshBase);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(Mesh, MeshBase);
protected:
-
bool _hasLightmapUVs;
GPUBuffer* _vertexBuffers[3] = {};
GPUBuffer* _indexBuffer = nullptr;
@@ -34,7 +33,6 @@ protected:
mutable int32 _cachedIndexBufferCount;
public:
-
Mesh(const Mesh& other)
: Mesh()
{
@@ -49,7 +47,6 @@ public:
~Mesh();
public:
-
///
/// Gets the model owning this mesh.
///
@@ -110,7 +107,6 @@ public:
#endif
public:
-
///
/// Updates the model mesh (used by the virtual models created with Init rather than Load).
///
@@ -189,7 +185,6 @@ public:
bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, Float3* vertices, uint32* triangles, Float3* normals = nullptr, Float3* tangents = nullptr, Float2* uvs = nullptr, Color32* colors = nullptr);
public:
-
///
/// Updates the model mesh index buffer (used by the virtual models created with Init rather than Load).
///
@@ -222,7 +217,6 @@ public:
bool UpdateTriangles(uint32 triangleCount, void* ib, bool use16BitIndices);
public:
-
///
/// Initializes instance of the class.
///
@@ -254,7 +248,6 @@ public:
void Unload();
public:
-
///
/// Determines if there is an intersection between the mesh and a ray in given world
///
@@ -275,7 +268,6 @@ public:
}
public:
-
///
/// Gets the draw call geometry for this mesh. Sets the index and vertex buffers.
///
@@ -375,14 +367,12 @@ public:
void Draw(const RenderContext& renderContext, const DrawInfo& info, float lodDitherFactor) const;
public:
-
// [MeshBase]
bool DownloadDataGPU(MeshBufferType type, BytesContainer& result) const override;
Task* DownloadDataGPUAsync(MeshBufferType type, BytesContainer& result) const override;
bool DownloadDataCPU(MeshBufferType type, BytesContainer& result, int32& count) const override;
private:
-
// Internal bindings
API_FUNCTION(NoProxy) ScriptingObject* GetParentModel();
#if !COMPILE_WITHOUT_CSHARP
diff --git a/Source/Engine/Graphics/Models/MeshBase.h b/Source/Engine/Graphics/Models/MeshBase.h
index 5a76e4f46..1816118d3 100644
--- a/Source/Engine/Graphics/Models/MeshBase.h
+++ b/Source/Engine/Graphics/Models/MeshBase.h
@@ -16,9 +16,8 @@ class ModelBase;
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API MeshBase : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(MeshBase);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(MeshBase);
protected:
-
ModelBase* _model;
BoundingBox _box;
BoundingSphere _sphere;
@@ -35,7 +34,6 @@ protected:
}
public:
-
///
/// Gets the model owning this mesh.
///
@@ -120,7 +118,6 @@ public:
void SetBounds(const BoundingBox& box);
public:
-
///
/// Extract mesh buffer data from GPU. Cannot be called from the main thread.
///
diff --git a/Source/Engine/Graphics/Models/ModelData.h b/Source/Engine/Graphics/Models/ModelData.h
index d1288bded..a3630e0aa 100644
--- a/Source/Engine/Graphics/Models/ModelData.h
+++ b/Source/Engine/Graphics/Models/ModelData.h
@@ -18,7 +18,6 @@
class FLAXENGINE_API MeshData
{
public:
-
///
/// The slot index in the model materials to use during rendering.
///
@@ -92,7 +91,6 @@ public:
Array BlendShapes;
public:
-
///
/// Determines whether this instance has any mesh data.
///
@@ -102,7 +100,6 @@ public:
}
public:
-
///
/// Clear arrays
///
@@ -130,7 +127,6 @@ public:
void Release();
public:
-
///
/// Init from model vertices array
///
@@ -185,7 +181,6 @@ public:
void SetIndexBuffer(void* data, uint32 indicesCount);
public:
-
///
/// Pack mesh data to the stream
///
@@ -213,7 +208,6 @@ public:
void CalculateSphere(BoundingSphere& result) const;
public:
-
#if COMPILE_WITH_MODEL_TOOL
///
@@ -363,7 +357,6 @@ struct FLAXENGINE_API MaterialSlotEntry
class FLAXENGINE_API ModelLodData
{
public:
-
///
/// The screen size to switch LODs. Bottom limit of the model screen size to render this LOD.
///
@@ -375,7 +368,6 @@ public:
Array Meshes;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -403,7 +395,6 @@ public:
class FLAXENGINE_API ModelData
{
public:
-
///
/// The minimum screen size to draw model (the bottom limit).
///
@@ -435,7 +426,6 @@ public:
AnimationData Animation;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -444,7 +434,6 @@ public:
}
public:
-
///
/// Gets the valid level of details count.
///
@@ -464,7 +453,6 @@ public:
}
public:
-
///
/// Automatically calculates the screen size for every model LOD for a proper transitions.
///
@@ -477,7 +465,6 @@ public:
void TransformBuffer(const Matrix& matrix);
public:
-
///
/// Pack mesh data to the header stream
///
diff --git a/Source/Engine/Graphics/Models/ModelInstanceEntry.h b/Source/Engine/Graphics/Models/ModelInstanceEntry.h
index 57bdce8cd..6e28c2a7e 100644
--- a/Source/Engine/Graphics/Models/ModelInstanceEntry.h
+++ b/Source/Engine/Graphics/Models/ModelInstanceEntry.h
@@ -12,8 +12,8 @@
///
API_STRUCT() struct FLAXENGINE_API ModelInstanceEntry : ISerializable
{
-API_AUTO_SERIALIZATION();
-DECLARE_SCRIPTING_TYPE_MINIMAL(ModelInstanceEntry);
+ API_AUTO_SERIALIZATION();
+ DECLARE_SCRIPTING_TYPE_MINIMAL(ModelInstanceEntry);
///
/// The mesh surface material used for the rendering. If not assigned the default value will be used from the model asset.
@@ -36,7 +36,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(ModelInstanceEntry);
API_FIELD() bool ReceiveDecals = true;
public:
-
bool operator==(const ModelInstanceEntry& other) const;
FORCE_INLINE bool operator!=(const ModelInstanceEntry& other) const
{
@@ -50,7 +49,6 @@ public:
class FLAXENGINE_API ModelInstanceEntries : public Array, public ISerializable
{
public:
-
///
/// Determines whether buffer is valid for the given model.
///
@@ -66,7 +64,6 @@ public:
bool IsValidFor(const SkinnedModel* model) const;
public:
-
///
/// Setup buffer for given model
///
@@ -117,7 +114,6 @@ public:
bool HasContentLoaded() const;
public:
-
// [ISerializable]
void Serialize(SerializeStream& stream, const void* otherObj) override;
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
diff --git a/Source/Engine/Graphics/Models/ModelLOD.h b/Source/Engine/Graphics/Models/ModelLOD.h
index efd5bc6e9..745f3ac16 100644
--- a/Source/Engine/Graphics/Models/ModelLOD.h
+++ b/Source/Engine/Graphics/Models/ModelLOD.h
@@ -12,16 +12,14 @@ class MemoryReadStream;
///
API_CLASS(NoSpawn) class FLAXENGINE_API ModelLOD : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(ModelLOD, ScriptingObject);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(ModelLOD, ScriptingObject);
friend Model;
friend Mesh;
private:
-
Model* _model = nullptr;
uint32 _verticesCount;
public:
-
///
/// The screen size to switch LODs. Bottom limit of the model screen size to render this LOD.
///
@@ -51,7 +49,6 @@ public:
}
public:
-
///
/// Initializes the LOD from the data stream.
///
@@ -70,7 +67,6 @@ public:
void Dispose();
public:
-
///
/// Determines if there is an intersection between the Model and a Ray in given world using given instance
///
diff --git a/Source/Engine/Graphics/Models/SkeletonData.h b/Source/Engine/Graphics/Models/SkeletonData.h
index 2b91bdbe8..6e6203e88 100644
--- a/Source/Engine/Graphics/Models/SkeletonData.h
+++ b/Source/Engine/Graphics/Models/SkeletonData.h
@@ -13,7 +13,7 @@
///
API_STRUCT() struct SkeletonNode
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(SkeletonNode);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(SkeletonNode);
///
/// The parent node index. The root node uses value -1.
@@ -36,7 +36,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(SkeletonNode);
///
API_STRUCT() struct SkeletonBone
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(SkeletonBone);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(SkeletonBone);
///
/// The parent bone index. The root bone uses value -1.
@@ -74,7 +74,6 @@ struct TIsPODType
class SkeletonData
{
public:
-
///
/// The nodes in this hierarchy. The root node is always at the index 0.
///
@@ -86,7 +85,6 @@ public:
Array Bones;
public:
-
///
/// Gets the root node reference.
///
diff --git a/Source/Engine/Graphics/Models/SkeletonMapping.h b/Source/Engine/Graphics/Models/SkeletonMapping.h
index 74f734d22..e9ec9f75e 100644
--- a/Source/Engine/Graphics/Models/SkeletonMapping.h
+++ b/Source/Engine/Graphics/Models/SkeletonMapping.h
@@ -12,11 +12,9 @@ template
class SkeletonMapping
{
public:
-
typedef Array Items;
public:
-
///
/// The amount of the nodes (from the source skeleton).
///
@@ -33,7 +31,6 @@ public:
Array SourceToSource;
public:
-
///
/// Initializes a new instance of the class.
///
diff --git a/Source/Engine/Graphics/Models/SkeletonUpdater.h b/Source/Engine/Graphics/Models/SkeletonUpdater.h
index 6ca4fefd2..1c17884d4 100644
--- a/Source/Engine/Graphics/Models/SkeletonUpdater.h
+++ b/Source/Engine/Graphics/Models/SkeletonUpdater.h
@@ -12,7 +12,6 @@ template
class SkeletonUpdater
{
public:
-
typedef Array Items;
///
@@ -43,14 +42,12 @@ public:
};
public:
-
///
/// The cached node transformations.
///
Array NodeTransformations;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -133,7 +130,6 @@ public:
}
public:
-
///
/// Gets the default root node.
///
@@ -149,7 +145,6 @@ public:
}
private:
-
void UpdateNode(Node& node)
{
// Compute local matrix
diff --git a/Source/Engine/Graphics/Models/SkinnedMesh.h b/Source/Engine/Graphics/Models/SkinnedMesh.h
index 2ee9bda76..08a9f8dbb 100644
--- a/Source/Engine/Graphics/Models/SkinnedMesh.h
+++ b/Source/Engine/Graphics/Models/SkinnedMesh.h
@@ -16,9 +16,8 @@ class SkinnedMeshDrawData;
///
API_CLASS(NoSpawn) class FLAXENGINE_API SkinnedMesh : public MeshBase
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedMesh, MeshBase);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedMesh, MeshBase);
protected:
-
GPUBuffer* _vertexBuffer = nullptr;
GPUBuffer* _indexBuffer = nullptr;
mutable Array _cachedIndexBuffer;
@@ -26,7 +25,6 @@ protected:
mutable int32 _cachedIndexBufferCount;
public:
-
SkinnedMesh(const SkinnedMesh& other)
: SkinnedMesh()
{
@@ -41,7 +39,6 @@ public:
~SkinnedMesh();
public:
-
///
/// Gets the skinned model owning this mesh.
///
@@ -64,7 +61,6 @@ public:
Array BlendShapes;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -93,7 +89,6 @@ public:
void Unload();
public:
-
///
/// Updates the model mesh (used by the virtual models created with Init rather than Load).
///
@@ -145,7 +140,6 @@ public:
bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, VB0SkinnedElementType* vb, void* ib, bool use16BitIndices);
public:
-
///
/// Determines if there is an intersection between the mesh and a ray in given world
///
@@ -166,7 +160,6 @@ public:
}
public:
-
///
/// Model instance drawing packed data.
///
@@ -238,14 +231,12 @@ public:
void Draw(const RenderContext& renderContext, const DrawInfo& info, float lodDitherFactor) const;
public:
-
// [MeshBase]
bool DownloadDataGPU(MeshBufferType type, BytesContainer& result) const override;
Task* DownloadDataGPUAsync(MeshBufferType type, BytesContainer& result) const override;
bool DownloadDataCPU(MeshBufferType type, BytesContainer& result, int32& count) const override;
private:
-
// Internal bindings
API_FUNCTION(NoProxy) ScriptingObject* GetParentModel();
#if !COMPILE_WITHOUT_CSHARP
diff --git a/Source/Engine/Graphics/Models/SkinnedMeshDrawData.h b/Source/Engine/Graphics/Models/SkinnedMeshDrawData.h
index e9f3e8eb2..2176fc7f1 100644
--- a/Source/Engine/Graphics/Models/SkinnedMeshDrawData.h
+++ b/Source/Engine/Graphics/Models/SkinnedMeshDrawData.h
@@ -11,12 +11,10 @@
class FLAXENGINE_API SkinnedMeshDrawData
{
private:
-
bool _hasValidData = false;
bool _isDirty = false;
public:
-
///
/// The bones count.
///
@@ -38,7 +36,6 @@ public:
Array Data;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -50,7 +47,6 @@ public:
~SkinnedMeshDrawData();
public:
-
///
/// Determines whether this instance is ready for rendering.
///
diff --git a/Source/Engine/Graphics/Models/SkinnedModelLOD.h b/Source/Engine/Graphics/Models/SkinnedModelLOD.h
index d41857af7..fbddf0041 100644
--- a/Source/Engine/Graphics/Models/SkinnedModelLOD.h
+++ b/Source/Engine/Graphics/Models/SkinnedModelLOD.h
@@ -12,14 +12,12 @@ class MemoryReadStream;
///
API_CLASS(NoSpawn) class FLAXENGINE_API SkinnedModelLOD : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedModelLOD, ScriptingObject);
+ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedModelLOD, ScriptingObject);
friend SkinnedModel;
private:
-
SkinnedModel* _model = nullptr;
public:
-
///
/// The screen size to switch LODs. Bottom limit of the model screen size to render this LOD.
///
@@ -36,7 +34,6 @@ public:
bool HasAnyMeshInitialized() const;
public:
-
///
/// Initializes the LOD from the data stream.
///
@@ -55,7 +52,6 @@ public:
void Dispose();
public:
-
///
/// Determines if there is an intersection between the Model and a Ray in given world using given instance
///
diff --git a/Source/Engine/Graphics/Models/Types.h b/Source/Engine/Graphics/Models/Types.h
index 357152430..2272a3a08 100644
--- a/Source/Engine/Graphics/Models/Types.h
+++ b/Source/Engine/Graphics/Models/Types.h
@@ -54,29 +54,29 @@ enum class MeshBufferType
// Vertex structure for all models (versioned)
PACK_STRUCT(struct ModelVertex15
{
- Float3 Position;
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
+ Float3 Position;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
});
PACK_STRUCT(struct ModelVertex18
{
- Float3 Position;
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
- Half2 LightmapUVs;
+ Float3 Position;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
+ Half2 LightmapUVs;
});
PACK_STRUCT(struct ModelVertex19
{
- Float3 Position;
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
- Half2 LightmapUVs;
- Color32 Color;
+ Float3 Position;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
+ Half2 LightmapUVs;
+ Color32 Color;
});
typedef ModelVertex19 ModelVertex;
@@ -96,32 +96,32 @@ struct RawModelVertex
// For vertex data we use three buffers: one with positions, one with other attributes, and one with colors
PACK_STRUCT(struct VB0ElementType15
{
- Float3 Position;
+ Float3 Position;
});
PACK_STRUCT(struct VB1ElementType15
{
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
});
PACK_STRUCT(struct VB0ElementType18
{
- Float3 Position;
+ Float3 Position;
});
PACK_STRUCT(struct VB1ElementType18
{
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
- Half2 LightmapUVs;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
+ Half2 LightmapUVs;
});
PACK_STRUCT(struct VB2ElementType18
{
- Color32 Color;
+ Color32 Color;
});
typedef VB0ElementType18 VB0ElementType;
@@ -132,12 +132,12 @@ typedef VB2ElementType18 VB2ElementType;
// Vertex structure for all skinned models (versioned)
PACK_STRUCT(struct SkinnedModelVertex1
{
- Float3 Position;
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
- Color32 BlendIndices;
- Color32 BlendWeights;
+ Float3 Position;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
+ Color32 BlendIndices;
+ Color32 BlendWeights;
});
typedef SkinnedModelVertex1 SkinnedModelVertex;
@@ -156,22 +156,22 @@ struct RawSkinnedModelVertex
PACK_STRUCT(struct VB0SkinnedElementType1
{
- Float3 Position;
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
- Color32 BlendIndices;
- Color32 BlendWeights;
+ Float3 Position;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
+ Color32 BlendIndices;
+ Color32 BlendWeights;
});
PACK_STRUCT(struct VB0SkinnedElementType2
{
- Float3 Position;
- Half2 TexCoord;
- Float1010102 Normal;
- Float1010102 Tangent;
- Color32 BlendIndices;
- Half4 BlendWeights;
+ Float3 Position;
+ Half2 TexCoord;
+ Float1010102 Normal;
+ Float1010102 Tangent;
+ Color32 BlendIndices;
+ Half4 BlendWeights;
});
typedef VB0SkinnedElementType2 VB0SkinnedElementType;
diff --git a/Source/Engine/Graphics/PixelFormatExtensions.h b/Source/Engine/Graphics/PixelFormatExtensions.h
index e0024f7b1..1d8ca8c25 100644
--- a/Source/Engine/Graphics/PixelFormatExtensions.h
+++ b/Source/Engine/Graphics/PixelFormatExtensions.h
@@ -10,16 +10,14 @@
///
API_CLASS(Static) class FLAXENGINE_API PixelFormatExtensions
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(PixelFormatExtensions);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(PixelFormatExtensions);
public:
-
///
/// Initializes cache.
///
static void Init();
public:
-
///
/// Calculates the size of a in bytes.
///
@@ -211,7 +209,6 @@ public:
API_FUNCTION() static PixelFormat MakeTypelessUNorm(PixelFormat format);
public:
-
static PixelFormat FindShaderResourceFormat(PixelFormat format, bool bSRGB);
static PixelFormat FindUnorderedAccessFormat(PixelFormat format);
static PixelFormat FindDepthStencilFormat(PixelFormat format);
diff --git a/Source/Engine/Graphics/PostProcessBase.h b/Source/Engine/Graphics/PostProcessBase.h
index 3ca6c206c..d903b1278 100644
--- a/Source/Engine/Graphics/PostProcessBase.h
+++ b/Source/Engine/Graphics/PostProcessBase.h
@@ -15,7 +15,6 @@ struct RenderContext;
class PostProcessBase
{
protected:
-
bool _isEnabled;
bool _useSingleTarget;
PostProcessEffectLocation _location;
@@ -28,7 +27,6 @@ protected:
}
public:
-
///
/// Destructor
///
@@ -37,7 +35,6 @@ public:
}
public:
-
///
/// Returns true if effect is enabled
///
@@ -101,7 +98,6 @@ public:
}
public:
-
///
/// Perform rendering
///
@@ -111,7 +107,6 @@ public:
virtual void Render(RenderContext& renderContext, GPUTexture* input, GPUTexture* output) = 0;
protected:
-
virtual void onEnable()
{
}
diff --git a/Source/Engine/Graphics/PostProcessSettings.cpp b/Source/Engine/Graphics/PostProcessSettings.cpp
index 5b9c7d4f8..0496a2a82 100644
--- a/Source/Engine/Graphics/PostProcessSettings.cpp
+++ b/Source/Engine/Graphics/PostProcessSettings.cpp
@@ -263,7 +263,7 @@ void PostProcessSettings::Serialize(SerializeStream& stream, const void* otherOb
stream.JKEY("AO");
stream.Object(&AmbientOcclusion, other ? &other->AmbientOcclusion : nullptr);
-
+
stream.JKEY("GI");
stream.Object(&GlobalIllumination, other ? &other->GlobalIllumination : nullptr);
diff --git a/Source/Engine/Graphics/PostProcessSettings.h b/Source/Engine/Graphics/PostProcessSettings.h
index a96bdf6bc..23153d34e 100644
--- a/Source/Engine/Graphics/PostProcessSettings.h
+++ b/Source/Engine/Graphics/PostProcessSettings.h
@@ -320,13 +320,13 @@ API_STRUCT() struct FLAXENGINE_API GlobalIlluminationSettings : ISerializable
///
API_FIELD(Attributes="EditorOrder(0), PostProcessSetting((int)GlobalIlluminationSettingsOverride.Mode)")
GlobalIlluminationMode Mode = GlobalIlluminationMode::None;
-
+
///
/// Global Illumination indirect lighting intensity scale. Can be used to boost or reduce GI effect.
///
API_FIELD(Attributes="EditorOrder(10), Limit(0, 10, 0.01f), PostProcessSetting((int)GlobalIlluminationSettingsOverride.Intensity)")
float Intensity = 1.0f;
-
+
///
/// Defines how quickly GI blends between the the current frame and the history buffer. Lower values update GI faster, but with more jittering and noise. If the camera in your game doesn't move much, we recommend values closer to 1.
///
diff --git a/Source/Engine/Graphics/RenderTargetPool.h b/Source/Engine/Graphics/RenderTargetPool.h
index fbc0fd3d1..cba7a325d 100644
--- a/Source/Engine/Graphics/RenderTargetPool.h
+++ b/Source/Engine/Graphics/RenderTargetPool.h
@@ -9,9 +9,8 @@
///
API_CLASS(Static) class FLAXENGINE_API RenderTargetPool
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(RenderTargetPool);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(RenderTargetPool);
public:
-
///
/// Flushes the temporary render targets.
///
diff --git a/Source/Engine/Graphics/RenderTask.h b/Source/Engine/Graphics/RenderTask.h
index 0604ccdfc..43ae15f71 100644
--- a/Source/Engine/Graphics/RenderTask.h
+++ b/Source/Engine/Graphics/RenderTask.h
@@ -26,7 +26,7 @@ class Actor;
///
API_CLASS() class FLAXENGINE_API RenderTask : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE(RenderTask);
+ DECLARE_SCRIPTING_TYPE(RenderTask);
///
/// List with all registered tasks
@@ -49,18 +49,15 @@ DECLARE_SCRIPTING_TYPE(RenderTask);
static void DrawAll();
private:
-
RenderTask* _prevTask = nullptr;
public:
-
///
/// Finalizes an instance of the class.
///
virtual ~RenderTask();
public:
-
///
/// Gets or sets a value indicating whether task is enabled.
///
@@ -150,7 +147,6 @@ public:
API_FUNCTION() virtual bool Resize(int32 width, int32 height);
public:
-
bool operator<(const RenderTask& other) const
{
return Order < other.Order;
@@ -193,21 +189,18 @@ DECLARE_ENUM_OPERATORS(ActorsSources);
class ManagedPostProcessEffect : public PostProcessBase
{
public:
-
///
/// The script to use. Inherits from C# class 'PostProcessEffect'.
///
Script* Target = nullptr;
public:
-
///
/// Fetches the information about the PostFx location from the managed object.
///
void FetchInfo();
public:
-
// [PostProcessBase]
bool IsLoaded() const override;
void Render(RenderContext& renderContext, GPUTexture* input, GPUTexture* output) override;
@@ -219,19 +212,17 @@ public:
///
API_CLASS() class FLAXENGINE_API SceneRenderTask : public RenderTask
{
-DECLARE_SCRIPTING_TYPE(SceneRenderTask);
+ DECLARE_SCRIPTING_TYPE(SceneRenderTask);
protected:
class SceneRendering* _customActorsScene = nullptr;
public:
-
///
/// Finalizes an instance of the class.
///
~SceneRenderTask();
public:
-
///
/// True if the current frame is after the camera cut. Used to clear the temporal effects history and prevent visual artifacts blended from the previous frames.
///
@@ -300,7 +291,6 @@ public:
Array CustomPostFx;
public:
-
///
/// The action called on view rendering to collect draw calls. It allows to extend rendering pipeline and draw custom geometry non-existing in the scene or custom actors set.
///
@@ -343,7 +333,6 @@ public:
virtual void OnPostRender(GPUContext* context, RenderContext& renderContext);
public:
-
///
/// Gets the rendering render task viewport (before upsampling).
///
@@ -360,7 +349,6 @@ public:
API_PROPERTY() GPUTextureView* GetOutputView() const;
public:
-
// [RenderTask]
bool Resize(int32 width, int32 height) override;
bool CanDraw() const override;
@@ -380,7 +368,7 @@ public:
///
API_CLASS() class FLAXENGINE_API MainRenderTask : public SceneRenderTask
{
-DECLARE_SCRIPTING_TYPE(MainRenderTask);
+ DECLARE_SCRIPTING_TYPE(MainRenderTask);
///
/// Finalizes an instance of the class.
@@ -388,14 +376,12 @@ DECLARE_SCRIPTING_TYPE(MainRenderTask);
~MainRenderTask();
public:
-
///
/// Gets the main game rendering task. Use it to plug custom rendering logic for your game.
///
API_FIELD(ReadOnly) static MainRenderTask* Instance;
public:
-
// [SceneRenderTask]
void OnBegin(GPUContext* context) override;
};
@@ -405,7 +391,7 @@ public:
///
API_STRUCT() struct RenderContext
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(RenderContext);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(RenderContext);
///
/// The render buffers.
diff --git a/Source/Engine/Graphics/RenderTools.h b/Source/Engine/Graphics/RenderTools.h
index 2a3541c3e..c3088a96d 100644
--- a/Source/Engine/Graphics/RenderTools.h
+++ b/Source/Engine/Graphics/RenderTools.h
@@ -20,9 +20,8 @@ PACK_STRUCT(struct QuadShaderData
///
API_CLASS(Static) class FLAXENGINE_API RenderTools
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(RenderTools);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(RenderTools);
public:
-
// Calculate a subresource index for a texture
FORCE_INLINE static int32 CalcSubresourceIndex(uint32 mipSlice, int32 arraySlice, int32 mipLevels)
{
@@ -54,7 +53,6 @@ public:
static void ComputePitch(PixelFormat format, int32 width, int32 height, uint32& rowPitch, uint32& slicePitch);
public:
-
static void UpdateModelLODTransition(byte& lodTransition);
static uint64 CalculateTextureMemoryUsage(PixelFormat format, int32 width, int32 height, int32 mipLevels);
static uint64 CalculateTextureMemoryUsage(PixelFormat format, int32 width, int32 height, int32 depth, int32 mipLevels);
diff --git a/Source/Engine/Graphics/RenderView.h b/Source/Engine/Graphics/RenderView.h
index 905106f5c..b06befda3 100644
--- a/Source/Engine/Graphics/RenderView.h
+++ b/Source/Engine/Graphics/RenderView.h
@@ -21,7 +21,7 @@ class SceneRenderTask;
///
API_STRUCT() struct FLAXENGINE_API RenderView
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(RenderView);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(RenderView);
///
/// The position of the view.
@@ -86,7 +86,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(RenderView);
API_FIELD() BoundingFrustum CullingFrustum;
public:
-
///
/// The draw passes mask for the current view rendering.
///
@@ -158,7 +157,6 @@ public:
API_FIELD() LayersMask RenderLayersMask;
public:
-
///
/// The view information vector with packed components to reconstruct linear depth and view position from the hardware depth buffer. Cached before rendering.
///
@@ -226,7 +224,6 @@ public:
}
public:
-
// Set up view with custom params
// @param viewProjection View * Projection matrix
void SetUp(const Matrix& viewProjection)
@@ -277,11 +274,9 @@ public:
void CopyFrom(Camera* camera, Viewport* viewport);
public:
-
DrawPass GetShadowsDrawPassMask(ShadowsCastingMode shadowsMode) const;
public:
-
// Camera's View * Projection matrix
FORCE_INLINE const Matrix& ViewProjection() const
{
diff --git a/Source/Engine/Graphics/Shaders/Cache/ShaderAssetBase.h b/Source/Engine/Graphics/Shaders/Cache/ShaderAssetBase.h
index ffe7b9d12..d0ebc0c8d 100644
--- a/Source/Engine/Graphics/Shaders/Cache/ShaderAssetBase.h
+++ b/Source/Engine/Graphics/Shaders/Cache/ShaderAssetBase.h
@@ -12,11 +12,9 @@
class FLAXENGINE_API ShaderAssetBase
{
protected:
-
ShaderStorage::Header _shaderHeader;
public:
-
static bool IsNullRenderer();
///
@@ -44,7 +42,6 @@ public:
#endif
protected:
-
bool initBase(AssetInitData& initData);
///
@@ -114,23 +111,21 @@ template
class ShaderAssetTypeBase : public BaseType, public ShaderAssetBase
{
public:
-
static const uint32 ShadersSerializedVersion = ShaderStorage::Header::Version;
protected:
-
explicit ShaderAssetTypeBase(const ScriptingObjectSpawnParams& params, const AssetInfo* info)
: BaseType(params, info)
{
}
protected:
-
// [BaseType]
bool init(AssetInitData& initData) override
{
return initBase(initData);
}
+
AssetChunksFlag getChunksToPreload() const override
{
AssetChunksFlag result = 0;
diff --git a/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.cpp b/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.cpp
index d0f0dc179..0e6ad8f3a 100644
--- a/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.cpp
+++ b/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.cpp
@@ -31,12 +31,10 @@ static_assert(ARRAY_COUNT(ShaderProfileCacheDirNames) == (int32)ShaderProfile::M
class ShaderProfileDatabase
{
public:
-
ShaderProfile Profile;
String Folder;
public:
-
void Init(ShaderProfile profile, const String& cacheRoot)
{
Profile = profile;
@@ -84,7 +82,6 @@ public:
class ShaderCacheManagerService : public EngineService
{
public:
-
ShaderCacheManagerService()
: EngineService(TEXT("Shader Cache Manager"), -200)
{
diff --git a/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.h b/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.h
index 9973a449f..25419e210 100644
--- a/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.h
+++ b/Source/Engine/Graphics/Shaders/Cache/ShaderCacheManager.h
@@ -18,7 +18,6 @@
class ShaderCacheManager
{
public:
-
struct CachedEntryHandle
{
Guid ID = Guid::Empty;
@@ -30,7 +29,6 @@ public:
};
public:
-
///
/// Tries to get cached shader entry for a given shader
///
diff --git a/Source/Engine/Graphics/Shaders/Cache/ShaderStorage.h b/Source/Engine/Graphics/Shaders/Cache/ShaderStorage.h
index 1cfc3f0a4..8d504d3c3 100644
--- a/Source/Engine/Graphics/Shaders/Cache/ShaderStorage.h
+++ b/Source/Engine/Graphics/Shaders/Cache/ShaderStorage.h
@@ -28,7 +28,6 @@ class MemoryReadStream;
class ShaderStorage
{
public:
-
///
/// Different shader cache storage modes (disabled, inside asset and in project cache)
///
@@ -46,14 +45,12 @@ public:
static CachingMode GetCachingMode();
public:
-
///
/// Packed version of the Magic Code for shader files
///
static const int32 MagicCode;
public:
-
///
/// File header, version 18
/// [Deprecated on 24.07.2019, expires on 10.05.2021]
diff --git a/Source/Engine/Graphics/Shaders/GPUConstantBuffer.h b/Source/Engine/Graphics/Shaders/GPUConstantBuffer.h
index aa795cd70..0d6eb41f6 100644
--- a/Source/Engine/Graphics/Shaders/GPUConstantBuffer.h
+++ b/Source/Engine/Graphics/Shaders/GPUConstantBuffer.h
@@ -10,11 +10,9 @@
class FLAXENGINE_API GPUConstantBuffer : public GPUResource
{
protected:
-
uint32 _size = 0;
public:
-
///
/// Gets the buffer size (in bytes).
///
@@ -25,7 +23,6 @@ public:
}
public:
-
// [GPUResource]
ResourceType GetResourceType() const override
{
diff --git a/Source/Engine/Graphics/Shaders/GPUShader.h b/Source/Engine/Graphics/Shaders/GPUShader.h
index 28ef2ee62..f10da5532 100644
--- a/Source/Engine/Graphics/Shaders/GPUShader.h
+++ b/Source/Engine/Graphics/Shaders/GPUShader.h
@@ -20,11 +20,9 @@ class GPUShaderProgram;
class GPUShaderProgramsContainer
{
private:
-
Dictionary _shaders;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -36,7 +34,6 @@ public:
~GPUShaderProgramsContainer();
public:
-
///
/// Adds a new shader program to the collection.
///
@@ -58,7 +55,6 @@ public:
void Clear();
public:
-
///
/// Calculates unique hash for given shader program name and its permutation index.
///
@@ -73,9 +69,8 @@ public:
///
API_CLASS(Sealed, NoSpawn) class FLAXENGINE_API GPUShader : public GPUResource
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUShader);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUShader);
protected:
-
GPUShaderProgramsContainer _shaders;
GPUConstantBuffer* _constantBuffers[MAX_CONSTANT_BUFFER_SLOTS];
@@ -85,7 +80,6 @@ protected:
GPUShader();
public:
-
///
/// Creates the shader resource and loads its data from the bytes.
/// The stream with compiled shader data.
@@ -93,7 +87,6 @@ public:
virtual bool Create(class MemoryReadStream& stream);
public:
-
///
/// Gets the vertex shader.
///
@@ -172,7 +165,6 @@ public:
}
public:
-
///
/// Determines whether the specified shader program is in the shader.
///
@@ -185,18 +177,15 @@ public:
}
protected:
-
GPUShaderProgram* GetShader(ShaderStage stage, const StringAnsiView& name, int32 permutationIndex) const;
virtual GPUShaderProgram* CreateGPUShaderProgram(ShaderStage type, const GPUShaderProgramInitializer& initializer, byte* cacheBytes, uint32 cacheSize, MemoryReadStream& stream) = 0;
virtual GPUConstantBuffer* CreateCB(const String& name, uint32 size, MemoryReadStream& stream) = 0;
public:
-
// [GPUResource]
ResourceType GetResourceType() const final override;
protected:
-
// [GPUResource]
void OnReleaseGPU() override;
};
diff --git a/Source/Engine/Graphics/Shaders/GPUShaderProgram.h b/Source/Engine/Graphics/Shaders/GPUShaderProgram.h
index ab373a1cd..826be670b 100644
--- a/Source/Engine/Graphics/Shaders/GPUShaderProgram.h
+++ b/Source/Engine/Graphics/Shaders/GPUShaderProgram.h
@@ -50,7 +50,6 @@ struct GPUShaderProgramInitializer
class FLAXENGINE_API GPUShaderProgram
{
protected:
-
StringAnsi _name;
ShaderBindings _bindings;
ShaderFlags _flags;
@@ -69,7 +68,6 @@ protected:
}
public:
-
///
/// Finalizes an instance of the class.
///
@@ -78,7 +76,6 @@ public:
}
public:
-
///
/// Gets name of the shader program.
///
@@ -104,7 +101,6 @@ public:
}
public:
-
///
/// Gets shader program stage type.
///
@@ -127,7 +123,6 @@ public:
class GPUShaderProgramVS : public GPUShaderProgram
{
public:
-
///
/// Gets input layout description handle (platform dependent).
///
@@ -139,7 +134,6 @@ public:
virtual byte GetInputLayoutSize() const = 0;
public:
-
// [GPUShaderProgram]
ShaderStage GetStage() const override
{
@@ -153,7 +147,6 @@ public:
class GPUShaderProgramGS : public GPUShaderProgram
{
public:
-
// [GPUShaderProgram]
ShaderStage GetStage() const override
{
@@ -167,11 +160,9 @@ public:
class GPUShaderProgramHS : public GPUShaderProgram
{
protected:
-
int32 _controlPointsCount;
public:
-
///
/// Gets the input control points count (valid range: 1-32).
///
@@ -181,7 +172,6 @@ public:
}
public:
-
// [GPUShaderProgram]
ShaderStage GetStage() const override
{
@@ -195,7 +185,6 @@ public:
class GPUShaderProgramDS : public GPUShaderProgram
{
public:
-
// [GPUShaderProgram]
ShaderStage GetStage() const override
{
@@ -209,7 +198,6 @@ public:
class GPUShaderProgramPS : public GPUShaderProgram
{
public:
-
// [GPUShaderProgram]
ShaderStage GetStage() const override
{
@@ -223,7 +211,6 @@ public:
class GPUShaderProgramCS : public GPUShaderProgram
{
public:
-
// [GPUShaderProgram]
ShaderStage GetStage() const override
{
diff --git a/Source/Engine/Graphics/Textures/GPUSampler.h b/Source/Engine/Graphics/Textures/GPUSampler.h
index 8b51cdb14..6f5760320 100644
--- a/Source/Engine/Graphics/Textures/GPUSampler.h
+++ b/Source/Engine/Graphics/Textures/GPUSampler.h
@@ -11,18 +11,16 @@
///
API_CLASS(Sealed) class FLAXENGINE_API GPUSampler : public GPUResource
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUSampler);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUSampler);
static GPUSampler* Spawn(const SpawnParams& params);
static GPUSampler* New();
protected:
-
GPUSamplerDescription _desc;
GPUSampler();
public:
-
///
/// Gets sampler description structure.
///
@@ -32,7 +30,6 @@ public:
}
public:
-
///
/// Creates new sampler.
///
@@ -41,18 +38,15 @@ public:
API_FUNCTION() bool Init(API_PARAM(Ref) const GPUSamplerDescription& desc);
protected:
-
virtual bool OnInit() = 0;
public:
-
// [GPUResource]
String ToString() const override;
ResourceType GetResourceType() const final override;
ObjectType GetObjectType() const final override;
protected:
-
// [GPUResource]
void OnReleaseGPU() override;
};
diff --git a/Source/Engine/Graphics/Textures/GPUSamplerDescription.h b/Source/Engine/Graphics/Textures/GPUSamplerDescription.h
index fd033864e..aec6f848d 100644
--- a/Source/Engine/Graphics/Textures/GPUSamplerDescription.h
+++ b/Source/Engine/Graphics/Textures/GPUSamplerDescription.h
@@ -79,7 +79,7 @@ API_ENUM() enum class GPUSamplerBorderColor
///
API_STRUCT() struct FLAXENGINE_API GPUSamplerDescription
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(GPUSamplerDescription);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(GPUSamplerDescription);
///
/// The filtering method to use when sampling a texture.
@@ -132,7 +132,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(GPUSamplerDescription);
API_FIELD() GPUSamplerCompareFunction ComparisonFunction;
public:
-
///
/// Creates a new with default settings.
///
@@ -142,13 +141,11 @@ public:
static GPUSamplerDescription New(GPUSamplerFilter filter = GPUSamplerFilter::Point, GPUSamplerAddressMode addressMode = GPUSamplerAddressMode::Wrap);
public:
-
void Clear();
bool Equals(const GPUSamplerDescription& other) const;
String ToString() const;
public:
-
FORCE_INLINE bool operator==(const GPUSamplerDescription& other) const
{
return Equals(other);
diff --git a/Source/Engine/Graphics/Textures/GPUTexture.cpp b/Source/Engine/Graphics/Textures/GPUTexture.cpp
index a2af29547..c8c4d3a34 100644
--- a/Source/Engine/Graphics/Textures/GPUTexture.cpp
+++ b/Source/Engine/Graphics/Textures/GPUTexture.cpp
@@ -629,14 +629,12 @@ GPUTask* GPUTexture::UploadMipMapAsync(const BytesContainer& data, int32 mipInde
class TextureDownloadDataTask : public ThreadPoolTask
{
private:
-
GPUTextureReference _texture;
GPUTexture* _staging;
TextureData* _data;
bool _deleteStaging;
public:
-
TextureDownloadDataTask(GPUTexture* texture, GPUTexture* staging, TextureData& data)
: _texture(texture)
, _staging(staging)
@@ -652,7 +650,6 @@ public:
}
public:
-
// [ThreadPoolTask]
bool HasReference(Object* resource) const override
{
@@ -660,7 +657,6 @@ public:
}
protected:
-
// [ThreadPoolTask]
bool Run() override
{
diff --git a/Source/Engine/Graphics/Textures/GPUTexture.h b/Source/Engine/Graphics/Textures/GPUTexture.h
index a0b4fc751..35fad9238 100644
--- a/Source/Engine/Graphics/Textures/GPUTexture.h
+++ b/Source/Engine/Graphics/Textures/GPUTexture.h
@@ -19,9 +19,8 @@ class Task;
///
API_CLASS(Sealed, NoSpawn) class FLAXENGINE_API GPUTextureView : public GPUResourceView
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUTextureView);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUTextureView);
protected:
-
GPUResource* _parent = nullptr;
PixelFormat _format = PixelFormat::Unknown;
MSAALevel _msaa = MSAALevel::None;
@@ -41,7 +40,6 @@ protected:
}
public:
-
///
/// Gets parent GPU resource owning that view.
///
@@ -72,12 +70,11 @@ public:
///
API_CLASS(Sealed) class FLAXENGINE_API GPUTexture : public GPUResource
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUTexture);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUTexture);
static GPUTexture* Spawn(const SpawnParams& params);
static GPUTexture* New();
protected:
-
int32 _residentMipLevels;
bool _sRGB, _isBlockCompressed;
GPUTextureDescription _desc;
@@ -88,7 +85,6 @@ protected:
GPUTexture();
public:
-
///
/// Gets a value indicating whether this texture has any resided mip (data already uploaded to the GPU).
///
@@ -202,7 +198,6 @@ public:
}
public:
-
///
/// Gets a value indicating whether this texture is a render target.
///
@@ -316,7 +311,6 @@ public:
}
public:
-
///
/// Gets the texture total size in pixels.
///
@@ -366,7 +360,6 @@ public:
void GetResidentSize(int32& width, int32& height, int32& depth) const;
public:
-
///
/// Calculates mip map row pitch (in bytes).
///
@@ -398,7 +391,6 @@ public:
int32 CalculateMipSize(int32 size, int32 mipLevel) const;
public:
-
int32 ComputeSubresourceSize(int32 subresource, int32 rowAlign, int32 sliceAlign) const;
int32 ComputeBufferOffset(int32 subresource, int32 rowAlign, int32 sliceAlign) const;
int32 ComputeBufferTotalSize(int32 rowAlign, int32 sliceAlign) const;
@@ -406,7 +398,6 @@ public:
int32 ComputeRowPitch(int32 mipLevel, int32 rowAlign) const;
public:
-
///
/// Gets the view to the first surface (only for 2D textures).
///
@@ -471,7 +462,6 @@ public:
}
public:
-
///
/// Initializes a texture resource (allocates the GPU memory and performs the resource setup).
///
@@ -513,7 +503,6 @@ public:
API_FUNCTION() bool Resize(int32 width, int32 height, int32 depth);
public:
-
///
/// Gets the native pointer to the underlying resource. It's a low-level platform-specific handle.
///
@@ -568,27 +557,24 @@ public:
/// Sets the number of resident mipmap levels in the texture (already uploaded to the GPU).
///
API_PROPERTY() void SetResidentMipLevels(int32 count);
-
+
///
/// Event called when texture residency gets changed. Texture Mip gets loaded into GPU memory and is ready to use.
///
Delegate ResidentMipsChanged;
protected:
-
virtual bool OnInit() = 0;
uint64 calculateMemoryUsage() const;
virtual void OnResidentMipsChanged() = 0;
public:
-
// [GPUResource]
String ToString() const override;
ResourceType GetResourceType() const final override;
ObjectType GetObjectType() const final override;
protected:
-
// [GPUResource]
void OnReleaseGPU() override;
};
diff --git a/Source/Engine/Graphics/Textures/GPUTextureDescription.h b/Source/Engine/Graphics/Textures/GPUTextureDescription.h
index e8940dad6..0194c9746 100644
--- a/Source/Engine/Graphics/Textures/GPUTextureDescription.h
+++ b/Source/Engine/Graphics/Textures/GPUTextureDescription.h
@@ -85,7 +85,7 @@ API_ENUM() enum class TextureDimensions
///
API_STRUCT() struct FLAXENGINE_API GPUTextureDescription
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(GPUTextureDescription);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(GPUTextureDescription);
///
/// The dimensions of the texture.
@@ -143,7 +143,6 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(GPUTextureDescription);
API_FIELD() Color DefaultClearColor;
public:
-
///
/// Gets a value indicating whether this instance is a render target.
///
@@ -225,7 +224,6 @@ public:
}
public:
-
///
/// Creates a new 1D with a single mipmap.
///
@@ -265,7 +263,6 @@ public:
static GPUTextureDescription New1D(int32 width, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount, int32 arraySize);
public:
-
///
/// Creates a new with a single mipmap.
///
@@ -310,7 +307,6 @@ public:
static GPUTextureDescription New2D(int32 width, int32 height, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount, int32 arraySize, MSAALevel msaaLevel = MSAALevel::None);
public:
-
///
/// Creates a new with a single mipmap.
///
@@ -362,7 +358,6 @@ public:
static GPUTextureDescription New3D(int32 width, int32 height, int32 depth, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount);
public:
-
///
/// Creates a new Cube .
///
@@ -399,7 +394,6 @@ public:
static GPUTextureDescription NewCube(int32 size, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount);
public:
-
void Clear();
GPUTextureDescription ToStagingUpload() const;
GPUTextureDescription ToStagingReadback() const;
@@ -407,7 +401,6 @@ public:
String ToString() const;
public:
-
FORCE_INLINE bool operator==(const GPUTextureDescription& other) const
{
return Equals(other);
diff --git a/Source/Engine/Graphics/Textures/ITextureOwner.h b/Source/Engine/Graphics/Textures/ITextureOwner.h
index d0a7fc9b7..ff2522672 100644
--- a/Source/Engine/Graphics/Textures/ITextureOwner.h
+++ b/Source/Engine/Graphics/Textures/ITextureOwner.h
@@ -14,7 +14,6 @@ class Task;
class FLAXENGINE_API ITextureOwner
{
public:
-
///
/// Gets the texture owner mutex used to synchronize texture logic.
///
diff --git a/Source/Engine/Graphics/Textures/StreamingTexture.cpp b/Source/Engine/Graphics/Textures/StreamingTexture.cpp
index f6dfe0743..8d78be57b 100644
--- a/Source/Engine/Graphics/Textures/StreamingTexture.cpp
+++ b/Source/Engine/Graphics/Textures/StreamingTexture.cpp
@@ -179,13 +179,11 @@ bool StreamingTexture::CanBeUpdated() const
class StreamTextureResizeTask : public GPUTask
{
private:
-
StreamingTexture* _streamingTexture;
GPUTexture* _newTexture;
int32 _uploadedMipCount;
public:
-
StreamTextureResizeTask(StreamingTexture* texture, GPUTexture* newTexture)
: GPUTask(Type::CopyResource)
, _streamingTexture(texture)
@@ -200,7 +198,6 @@ public:
}
protected:
-
// [GPUTask]
Result run(GPUTasksContext* context) override
{
@@ -222,6 +219,7 @@ protected:
return Result::Ok;
}
+
void OnEnd() override
{
Platform::InterlockedDecrement(&_streamingTexture->_streamingTasksCount);
@@ -229,6 +227,7 @@ protected:
// Base
GPUTask::OnEnd();
}
+
void OnSync() override
{
Swap(_streamingTexture->_texture, _newTexture);
@@ -310,12 +309,10 @@ Task* StreamingTexture::UpdateAllocation(int32 residency)
class StreamTextureMipTask : public GPUUploadTextureMipTask
{
private:
-
StreamingTexture* _streamingTexture;
FlaxStorage::LockData _dataLock;
public:
-
StreamTextureMipTask(StreamingTexture* texture, int32 mipIndex)
: GPUUploadTextureMipTask(texture->GetTexture(), mipIndex, Span(nullptr, 0), 0, 0, false)
, _streamingTexture(texture)
@@ -326,7 +323,6 @@ public:
}
private:
-
void onResourceUnload2(GPUTextureReference* ref)
{
// Unlink texture
@@ -338,7 +334,6 @@ private:
}
protected:
-
// [GPUTask]
Result run(GPUTasksContext* context) override
{
@@ -378,6 +373,7 @@ protected:
return Result::Ok;
}
+
void OnEnd() override
{
_dataLock.Release();
@@ -390,6 +386,7 @@ protected:
// Base
GPUUploadTextureMipTask::OnEnd();
}
+
void OnFail() override
{
if (_streamingTexture)
diff --git a/Source/Engine/Graphics/Textures/StreamingTexture.h b/Source/Engine/Graphics/Textures/StreamingTexture.h
index 6e93a95e7..24570c5fb 100644
--- a/Source/Engine/Graphics/Textures/StreamingTexture.h
+++ b/Source/Engine/Graphics/Textures/StreamingTexture.h
@@ -16,7 +16,6 @@ class FLAXENGINE_API StreamingTexture : public Object, public StreamableResource
friend class StreamTextureMipTask;
friend class StreamTextureResizeTask;
protected:
-
ITextureOwner* _owner;
GPUTexture* _texture;
TextureHeader _header;
@@ -25,12 +24,10 @@ protected:
bool _isBlockCompressed;
public:
-
StreamingTexture(ITextureOwner* owner, const String& name);
~StreamingTexture();
public:
-
///
/// Gets the owner.
///
@@ -125,7 +122,6 @@ public:
}
public:
-
///
/// Converts allocated texture mip index to the absolute mip map index.
///
@@ -141,7 +137,6 @@ public:
int32 TotalIndexToTextureMipIndex(int32 mipIndex) const;
public:
-
///
/// Creates new texture
///
@@ -162,14 +157,12 @@ public:
uint64 GetTotalMemoryUsage() const;
public:
-
FORCE_INLINE GPUTexture* operator->() const
{
return _texture;
}
public:
-
// [Object]
String ToString() const override;
diff --git a/Source/Engine/Graphics/Textures/TextureBase.cpp b/Source/Engine/Graphics/Textures/TextureBase.cpp
index 9c8c5af57..73667bb83 100644
--- a/Source/Engine/Graphics/Textures/TextureBase.cpp
+++ b/Source/Engine/Graphics/Textures/TextureBase.cpp
@@ -784,7 +784,7 @@ bool TextureBase::InitData::GenerateMip(int32 mipIndex, bool linear)
{
switch (Format)
{
- // 4 component, 32 bit with 8 bits per component - use Color32 type
+ // 4 component, 32 bit with 8 bits per component - use Color32 type
case PixelFormat::R8G8B8A8_SInt:
case PixelFormat::R8G8B8A8_Typeless:
case PixelFormat::R8G8B8A8_SNorm:
diff --git a/Source/Engine/Graphics/Textures/TextureBase.h b/Source/Engine/Graphics/Textures/TextureBase.h
index be892a557..694bf3372 100644
--- a/Source/Engine/Graphics/Textures/TextureBase.h
+++ b/Source/Engine/Graphics/Textures/TextureBase.h
@@ -14,7 +14,7 @@ class TextureMipData;
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API TextureBase : public BinaryAsset, public ITextureOwner
{
-DECLARE_ASSET_HEADER(TextureBase);
+ DECLARE_ASSET_HEADER(TextureBase);
static const uint32 TexturesSerializedVersion = 4;
///
@@ -48,13 +48,11 @@ DECLARE_ASSET_HEADER(TextureBase);
};
protected:
-
StreamingTexture _texture;
InitData* _customData;
BinaryAsset* _parent;
public:
-
///
/// Gets the streaming texture object handle.
///
@@ -124,7 +122,7 @@ public:
/// Gets the total memory usage that texture may have in use (if loaded to the maximum quality). Exact value may differ due to memory alignment and resource allocation policy.
///
API_PROPERTY() uint64 GetTotalMemoryUsage() const;
-
+
///
/// Gets the index of the texture group used by this texture.
///
@@ -136,7 +134,6 @@ public:
API_PROPERTY() void SetTextureGroup(int32 textureGroup);
public:
-
///
/// Gets the mip data.
///
@@ -214,16 +211,13 @@ public:
bool Init(InitData* initData);
protected:
-
virtual int32 CalculateChunkIndex(int32 mipIndex) const;
private:
-
// Internal bindings
API_FUNCTION(NoProxy) bool Init(void* ptr);
public:
-
// [ITextureOwner]
CriticalSection& GetOwnerLocker() const override;
Task* RequestMipDataAsync(int32 mipIndex) override;
@@ -233,7 +227,6 @@ public:
bool GetMipDataCustomPitch(int32 mipIndex, uint32& rowPitch, uint32& slicePitch) const override;
protected:
-
// [BinaryAsset]
bool init(AssetInitData& initData) override;
LoadResult load() override;
diff --git a/Source/Engine/Graphics/Textures/TextureData.h b/Source/Engine/Graphics/Textures/TextureData.h
index 141f455db..33f6d8df1 100644
--- a/Source/Engine/Graphics/Textures/TextureData.h
+++ b/Source/Engine/Graphics/Textures/TextureData.h
@@ -13,7 +13,6 @@
class FLAXENGINE_API TextureMipData
{
public:
-
uint32 RowPitch;
uint32 DepthPitch;
uint32 Lines;
@@ -47,7 +46,6 @@ public:
class FLAXENGINE_API TextureData
{
public:
-
///
/// Single entry of the texture array. Contains collection of mip maps.
///
@@ -60,7 +58,6 @@ public:
};
public:
-
///
/// Init
///
@@ -76,7 +73,6 @@ public:
}
public:
-
///
/// Top level texture width (in pixels).
///
@@ -103,7 +99,6 @@ public:
Array> Items;
public:
-
///
/// Gather texture data
///
diff --git a/Source/Engine/Graphics/Textures/TextureUtils.h b/Source/Engine/Graphics/Textures/TextureUtils.h
index e5264c39b..5ab496fe6 100644
--- a/Source/Engine/Graphics/Textures/TextureUtils.h
+++ b/Source/Engine/Graphics/Textures/TextureUtils.h
@@ -11,7 +11,6 @@
class TextureUtils
{
public:
-
static PixelFormat ToPixelFormat(const TextureFormatType format, int32 width, int32 height, bool canCompress)
{
const bool canUseBlockCompression = width % 4 == 0 && height % 4 == 0;
diff --git a/Source/Engine/Input/Gamepad.h b/Source/Engine/Input/Gamepad.h
index ee8d7d4a1..bd4e70c99 100644
--- a/Source/Engine/Input/Gamepad.h
+++ b/Source/Engine/Input/Gamepad.h
@@ -11,7 +11,7 @@
///
API_STRUCT() struct FLAXENGINE_API GamepadVibrationState
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(GamepadVibrationState);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(GamepadVibrationState);
///
/// The left large motor vibration.
@@ -74,9 +74,8 @@ struct FLAXENGINE_API GamepadLayout
///
API_CLASS(NoSpawn, Sealed) class FLAXENGINE_API Gamepad : public InputDevice
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Gamepad);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Gamepad);
public:
-
///
/// The universal gamepad state description. All hardware gamepad device handlers should map input to match this structure.
/// Later on, each gamepad may use individual layout for a game.
@@ -103,7 +102,6 @@ public:
};
protected:
-
Guid _productId;
State _state;
State _mappedState;
@@ -112,14 +110,12 @@ protected:
explicit Gamepad(const Guid& productId, const String& name);
public:
-
///
/// The gamepad layout.
///
GamepadLayout Layout;
public:
-
///
/// Gets the gamepad device type identifier.
///
@@ -179,7 +175,6 @@ public:
}
public:
-
///
/// Sets the state of the gamepad vibration. Ignored if controller does not support this.
///
@@ -204,7 +199,6 @@ public:
}
public:
-
// [InputDevice]
void ResetState() override;
bool Update(EventQueue& queue) final override;
diff --git a/Source/Engine/Input/Input.cpp b/Source/Engine/Input/Input.cpp
index 04901cecc..aba26b6a0 100644
--- a/Source/Engine/Input/Input.cpp
+++ b/Source/Engine/Input/Input.cpp
@@ -67,7 +67,6 @@ using namespace InputImpl;
class InputService : public EngineService
{
public:
-
InputService()
: EngineService(TEXT("Input"), -60)
{
@@ -692,7 +691,7 @@ void InputService::Update()
continue;
switch (e.Type)
{
- // Keyboard events
+ // Keyboard events
case InputDevice::EventType::Char:
window->OnCharInput(e.CharData.Char);
break;
@@ -702,7 +701,7 @@ void InputService::Update()
case InputDevice::EventType::KeyUp:
window->OnKeyUp(e.KeyData.Key);
break;
- // Mouse events
+ // Mouse events
case InputDevice::EventType::MouseDown:
window->OnMouseDown(window->ScreenToClient(e.MouseData.Position), e.MouseData.Button);
break;
@@ -721,7 +720,7 @@ void InputService::Update()
case InputDevice::EventType::MouseLeave:
window->OnMouseLeave();
break;
- // Touch events
+ // Touch events
case InputDevice::EventType::TouchDown:
window->OnTouchDown(window->ScreenToClient(e.TouchData.Position), e.TouchData.PointerId);
break;
@@ -748,7 +747,7 @@ void InputService::Update()
{
switch (e.Type)
{
- // Keyboard events
+ // Keyboard events
case InputDevice::EventType::Char:
Input::CharInput(e.CharData.Char);
break;
@@ -758,7 +757,7 @@ void InputService::Update()
case InputDevice::EventType::KeyUp:
Input::KeyUp(e.KeyData.Key);
break;
- // Mouse events
+ // Mouse events
case InputDevice::EventType::MouseDown:
Input::MouseDown(e.MouseData.Position, e.MouseData.Button);
break;
@@ -777,7 +776,7 @@ void InputService::Update()
case InputDevice::EventType::MouseLeave:
Input::MouseLeave();
break;
- // Touch events
+ // Touch events
case InputDevice::EventType::TouchDown:
Input::TouchDown(e.TouchData.Position, e.TouchData.PointerId);
break;
diff --git a/Source/Engine/Input/Input.h b/Source/Engine/Input/Input.h
index 191366d1d..a09b3358c 100644
--- a/Source/Engine/Input/Input.h
+++ b/Source/Engine/Input/Input.h
@@ -20,7 +20,7 @@ class InputDevice;
///
API_CLASS(Static) class FLAXENGINE_API Input
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Input);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Input);
///
/// Gets the mouse (null if platform does not support mouse or it is not connected).
@@ -66,7 +66,6 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Input);
static Array> CustomDevices;
public:
-
typedef Delegate CharDelegate;
typedef Delegate KeyboardDelegate;
typedef Delegate MouseDelegate;
@@ -135,7 +134,6 @@ public:
static TouchDelegate TouchUp;
public:
-
///
/// Gets the text entered during the current frame (Unicode).
///
@@ -164,7 +162,6 @@ public:
API_FUNCTION() static bool GetKeyUp(KeyboardKeys key);
public:
-
///
/// Gets the mouse position in game window coordinates.
///
@@ -223,7 +220,6 @@ public:
API_FUNCTION() static bool GetMouseButtonUp(MouseButton button);
public:
-
///
/// Gets the gamepad axis value.
///
@@ -289,7 +285,6 @@ public:
API_FUNCTION() static bool GetGamepadButtonUp(InputGamepadIndex gamepad, GamepadButton button);
public:
-
///
/// Maps a discrete button or key press events to a "friendly name" that will later be bound to event-driven behavior. The end effect is that pressing (and/or releasing) a key, mouse button, or keypad button.
///
diff --git a/Source/Engine/Input/InputDevice.h b/Source/Engine/Input/InputDevice.h
index 80766f18c..99db3c2d0 100644
--- a/Source/Engine/Input/InputDevice.h
+++ b/Source/Engine/Input/InputDevice.h
@@ -13,9 +13,8 @@
///
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API InputDevice : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(InputDevice);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(InputDevice);
public:
-
enum class EventType
{
Char,
@@ -81,7 +80,6 @@ public:
typedef Array> EventQueue;
protected:
-
String _name;
EventQueue _queue;
@@ -92,7 +90,6 @@ protected:
}
public:
-
///
/// Gets the name.
///
diff --git a/Source/Engine/Input/InputSettings.h b/Source/Engine/Input/InputSettings.h
index a34732b2b..e4b217007 100644
--- a/Source/Engine/Input/InputSettings.h
+++ b/Source/Engine/Input/InputSettings.h
@@ -11,9 +11,8 @@
///
API_CLASS(sealed, Namespace="FlaxEditor.Content.Settings") class FLAXENGINE_API InputSettings : public SettingsBase
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(InputSettings);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(InputSettings);
public:
-
///
/// Maps a discrete button or key press events to a "friendly name" that will later be bound to event-driven behavior. The end effect is that pressing (and/or releasing) a key, mouse button, or keypad button.
///
@@ -25,7 +24,6 @@ public:
Array AxisMappings;
public:
-
///
/// Gets the instance of the settings asset (default value if missing). Object returned by this method is always loaded with valid data to use.
///
diff --git a/Source/Engine/Input/Keyboard.h b/Source/Engine/Input/Keyboard.h
index 16b4e8a97..3b673b486 100644
--- a/Source/Engine/Input/Keyboard.h
+++ b/Source/Engine/Input/Keyboard.h
@@ -9,9 +9,8 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API Keyboard : public InputDevice
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Keyboard);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Keyboard);
protected:
-
struct State
{
uint16 InputTextLength;
@@ -26,7 +25,6 @@ protected:
explicit Keyboard();
public:
-
///
/// Gets the text entered during the current frame.
///
@@ -72,7 +70,6 @@ public:
API_PROPERTY() bool IsAnyKeyDown() const;
public:
-
///
/// Called when keyboard enters input character.
///
@@ -95,7 +92,6 @@ public:
void OnKeyDown(KeyboardKeys key, Window* target = nullptr);
public:
-
// [InputDevice]
void ResetState() override;;
bool Update(EventQueue& queue) final override;
diff --git a/Source/Engine/Input/Mouse.h b/Source/Engine/Input/Mouse.h
index 9dba1392a..78da85bd9 100644
--- a/Source/Engine/Input/Mouse.h
+++ b/Source/Engine/Input/Mouse.h
@@ -12,9 +12,8 @@
///
API_CLASS(NoSpawn) class FLAXENGINE_API Mouse : public InputDevice
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Mouse);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Mouse);
public:
-
///
/// The mouse state.
///
@@ -45,7 +44,6 @@ public:
};
protected:
-
State _state;
State _prevState;
@@ -57,7 +55,6 @@ protected:
}
public:
-
///
/// Gets the position of the mouse in the screen-space coordinates.
///
@@ -116,7 +113,6 @@ public:
}
public:
-
///
/// Sets the mouse position.
///
@@ -175,7 +171,6 @@ public:
void OnMouseWheel(const Float2& position, float delta, Window* target = nullptr);
public:
-
// [InputDevice]
void ResetState() override;
bool Update(EventQueue& queue) final override;
diff --git a/Source/Engine/Input/VirtualInput.h b/Source/Engine/Input/VirtualInput.h
index ef33c55a8..8036c3d48 100644
--- a/Source/Engine/Input/VirtualInput.h
+++ b/Source/Engine/Input/VirtualInput.h
@@ -11,7 +11,7 @@
///
API_STRUCT() struct ActionConfig
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(ActionConfig);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(ActionConfig);
///
/// The action "friendly name" used to access it from code.
@@ -55,7 +55,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(ActionConfig);
///
API_STRUCT() struct AxisConfig
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(AxisConfig);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(AxisConfig);
///
/// The axis "friendly name" used to access it from code.
diff --git a/Source/Engine/Localization/CultureInfo.h b/Source/Engine/Localization/CultureInfo.h
index 6151b406c..1ead5d876 100644
--- a/Source/Engine/Localization/CultureInfo.h
+++ b/Source/Engine/Localization/CultureInfo.h
@@ -10,7 +10,7 @@
///
API_CLASS(InBuild, Namespace="System.Globalization") class FLAXENGINE_API CultureInfo
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(CultureInfo);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(CultureInfo);
private:
void* _data;
int32 _lcid;
diff --git a/Source/Engine/Localization/LocalizedString.h b/Source/Engine/Localization/LocalizedString.h
index 89e32c443..1af61283a 100644
--- a/Source/Engine/Localization/LocalizedString.h
+++ b/Source/Engine/Localization/LocalizedString.h
@@ -10,7 +10,7 @@
///
API_CLASS(Sealed) class FLAXENGINE_API LocalizedString
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(LocalizedString);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(LocalizedString);
public:
///
/// The localized string identifier. Used to lookup text value for a current language (via ).
diff --git a/Source/Engine/Navigation/NavLink.h b/Source/Engine/Navigation/NavLink.h
index 1b450342e..50a6cc39e 100644
--- a/Source/Engine/Navigation/NavLink.h
+++ b/Source/Engine/Navigation/NavLink.h
@@ -10,9 +10,8 @@
///
API_CLASS() class FLAXENGINE_API NavLink : public Actor
{
-DECLARE_SCENE_OBJECT(NavLink);
+ DECLARE_SCENE_OBJECT(NavLink);
public:
-
///
/// The start location which transform is representing link start position. It is defined in local-space of the actor.
///
@@ -38,11 +37,9 @@ public:
bool BiDirectional;
private:
-
void UpdateBounds();
public:
-
// [Actor]
#if USE_EDITOR
void OnDebugDrawSelected() override;
@@ -51,7 +48,6 @@ public:
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
protected:
-
// [Actor]
void OnTransformChanged() override;
};
diff --git a/Source/Engine/Navigation/NavMesh.h b/Source/Engine/Navigation/NavMesh.h
index 6f5052b89..85e6dd087 100644
--- a/Source/Engine/Navigation/NavMesh.h
+++ b/Source/Engine/Navigation/NavMesh.h
@@ -16,9 +16,8 @@ class NavMeshRuntime;
///
API_CLASS() class FLAXENGINE_API NavMesh : public Actor
{
-DECLARE_SCENE_OBJECT(NavMesh);
+ DECLARE_SCENE_OBJECT(NavMesh);
public:
-
///
/// The flag used to mark that navigation data has been modified since load. Used to save runtime data to the file on scene serialization.
///
@@ -49,7 +48,6 @@ public:
API_FIELD(Attributes="EditorOrder(10), EditorDisplay(\"Nav Mesh\")") NavMeshProperties Properties;
public:
-
///
/// Saves the nav mesh tiles data to the asset. Supported only in builds with assets saving enabled (eg. editor) and not during gameplay (eg. design time).
///
@@ -66,19 +64,16 @@ public:
NavMeshRuntime* GetRuntime(bool createIfMissing = true) const;
private:
-
void AddTiles();
void RemoveTiles();
void OnDataAssetLoaded();
public:
-
// [Actor]
void Serialize(SerializeStream& stream, const void* otherObj) override;
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
protected:
-
// [Actor]
void OnEnable() override;
void OnDisable() override;
diff --git a/Source/Engine/Navigation/NavMeshBoundsVolume.h b/Source/Engine/Navigation/NavMeshBoundsVolume.h
index 4ce58b959..51f2e80eb 100644
--- a/Source/Engine/Navigation/NavMeshBoundsVolume.h
+++ b/Source/Engine/Navigation/NavMeshBoundsVolume.h
@@ -10,9 +10,8 @@
///
API_CLASS() class FLAXENGINE_API NavMeshBoundsVolume : public BoxVolume
{
-DECLARE_SCENE_OBJECT(NavMeshBoundsVolume);
+ DECLARE_SCENE_OBJECT(NavMeshBoundsVolume);
public:
-
///
/// The agent types used by this navmesh bounds volume (from navigation settings). Can be used to generate navmesh for a certain set of agents.
///
@@ -20,13 +19,11 @@ public:
NavAgentMask AgentsMask;
public:
-
// [BoxVolume]
void Serialize(SerializeStream& stream, const void* otherObj) override;
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
protected:
-
// [BoxVolume]
void OnEnable() override;
void OnDisable() override;
diff --git a/Source/Engine/Navigation/NavMeshBuilder.h b/Source/Engine/Navigation/NavMeshBuilder.h
index 12b3ec098..42c9efc36 100644
--- a/Source/Engine/Navigation/NavMeshBuilder.h
+++ b/Source/Engine/Navigation/NavMeshBuilder.h
@@ -14,7 +14,6 @@ class Scene;
class FLAXENGINE_API NavMeshBuilder
{
public:
-
static void Init();
static bool IsBuildingNavMesh();
static float GetNavMeshBuildingProgress();
diff --git a/Source/Engine/Navigation/NavMeshData.h b/Source/Engine/Navigation/NavMeshData.h
index fb6b88849..a56e3a569 100644
--- a/Source/Engine/Navigation/NavMeshData.h
+++ b/Source/Engine/Navigation/NavMeshData.h
@@ -33,7 +33,6 @@ struct NavMeshDataHeader
class NavMeshData
{
public:
-
///
/// The size of the navmesh tile (in world units).
///
@@ -45,7 +44,6 @@ public:
Array Tiles;
public:
-
///
/// Saves the navmesh tiles to the specified stream.
///
diff --git a/Source/Engine/Navigation/NavMeshRuntime.h b/Source/Engine/Navigation/NavMeshRuntime.h
index b9e08f63e..98fc2e326 100644
--- a/Source/Engine/Navigation/NavMeshRuntime.h
+++ b/Source/Engine/Navigation/NavMeshRuntime.h
@@ -17,7 +17,6 @@ class NavMesh;
class FLAXENGINE_API NavMeshTile
{
public:
-
int32 X;
int32 Y;
int32 Layer;
@@ -31,7 +30,6 @@ public:
class FLAXENGINE_API NavMeshRuntime
{
public:
-
// Gets the navigation mesh runtime for a given navmesh name. Return null if missing.
static NavMeshRuntime* Get(const StringView& navMeshName);
@@ -48,19 +46,16 @@ public:
#endif
private:
-
dtNavMesh* _navMesh;
dtNavMeshQuery* _navMeshQuery;
float _tileSize;
Array _tiles;
public:
-
NavMeshRuntime(const NavMeshProperties& properties);
~NavMeshRuntime();
public:
-
///
/// The object locker.
///
@@ -92,7 +87,6 @@ public:
int32 GetTilesCapacity() const;
public:
-
///
/// Finds the distance from the specified start position to the nearest polygon wall.
///
@@ -153,7 +147,6 @@ public:
bool RayCast(const Vector3& startPosition, const Vector3& endPosition, NavMeshHit& hitInfo) const;
public:
-
///
/// Sets the size of the tile (if not assigned). Disposes the mesh if added tiles have different size.
///
@@ -210,6 +203,5 @@ public:
void Dispose();
private:
-
void AddTileInternal(NavMesh* navMesh, NavMeshTileData& tileData);
};
diff --git a/Source/Engine/Navigation/NavModifierVolume.h b/Source/Engine/Navigation/NavModifierVolume.h
index dbd8818fc..f06149872 100644
--- a/Source/Engine/Navigation/NavModifierVolume.h
+++ b/Source/Engine/Navigation/NavModifierVolume.h
@@ -10,9 +10,8 @@
///
API_CLASS() class FLAXENGINE_API NavModifierVolume : public BoxVolume
{
-DECLARE_SCENE_OBJECT(NavModifierVolume);
+ DECLARE_SCENE_OBJECT(NavModifierVolume);
public:
-
///
/// The agent types used by this navmesh modifier volume (from navigation settings). Can be used to adjust navmesh for a certain set of agents.
///
@@ -26,20 +25,17 @@ public:
String AreaName;
public:
-
///
/// Gets the properties of the nav area used by this volume. Null if missing or invalid area name.
///
NavAreaProperties* GetNavArea() const;
public:
-
// [BoxVolume]
void Serialize(SerializeStream& stream, const void* otherObj) override;
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
protected:
-
// [BoxVolume]
void OnBoundsChanged(const BoundingBox& prevBounds) override;
#if USE_EDITOR
diff --git a/Source/Engine/Navigation/Navigation.cpp b/Source/Engine/Navigation/Navigation.cpp
index c77617670..1c3863374 100644
--- a/Source/Engine/Navigation/Navigation.cpp
+++ b/Source/Engine/Navigation/Navigation.cpp
@@ -152,7 +152,6 @@ bool NavMeshProperties::operator==(const NavMeshProperties& other) const
class NavigationService : public EngineService
{
public:
-
NavigationService()
: EngineService(TEXT("Navigation"), 60)
{
diff --git a/Source/Engine/Navigation/Navigation.h b/Source/Engine/Navigation/Navigation.h
index 20f40e785..f68614aae 100644
--- a/Source/Engine/Navigation/Navigation.h
+++ b/Source/Engine/Navigation/Navigation.h
@@ -11,9 +11,8 @@ class Scene;
///
API_CLASS(Static) class FLAXENGINE_API Navigation
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(Navigation);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Navigation);
public:
-
///
/// Finds the distance from the specified start position to the nearest polygon wall.
///
@@ -74,7 +73,6 @@ public:
API_FUNCTION() static bool RayCast(const Vector3& startPosition, const Vector3& endPosition, API_PARAM(Out) NavMeshHit& hitInfo);
public:
-
#if COMPILE_WITH_NAV_MESH_BUILDER
///
diff --git a/Source/Engine/Navigation/NavigationSettings.h b/Source/Engine/Navigation/NavigationSettings.h
index de0d6ba66..bd884318e 100644
--- a/Source/Engine/Navigation/NavigationSettings.h
+++ b/Source/Engine/Navigation/NavigationSettings.h
@@ -11,9 +11,8 @@
///
API_CLASS(sealed, Namespace="FlaxEditor.Content.Settings", NoConstructor) class FLAXENGINE_API NavigationSettings : public SettingsBase
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NavigationSettings);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NavigationSettings);
public:
-
///
/// If checked, enables automatic navmesh actors spawning on a scenes that are using it during navigation building.
///
@@ -27,7 +26,6 @@ public:
bool AutoRemoveMissingNavMeshes = true;
public:
-
///
/// The height of a grid cell in the navigation mesh building steps using heightfields. A lower number means higher precision on the vertical axis but longer build times.
///
@@ -83,7 +81,6 @@ public:
float MaxDetailSamplingError = 1.0f;
public:
-
///
/// The configuration for navmeshes.
///
@@ -97,7 +94,6 @@ public:
Array NavAreas;
public:
-
NavigationSettings();
///
diff --git a/Source/Engine/Navigation/NavigationTypes.h b/Source/Engine/Navigation/NavigationTypes.h
index 4997064dc..5cf8689ec 100644
--- a/Source/Engine/Navigation/NavigationTypes.h
+++ b/Source/Engine/Navigation/NavigationTypes.h
@@ -16,8 +16,8 @@
///
API_STRUCT() struct FLAXENGINE_API NavAgentProperties : ISerializable
{
-API_AUTO_SERIALIZATION();
-DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentProperties);
+ API_AUTO_SERIALIZATION();
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentProperties);
///
/// The radius of the agent used for navigation. Agents can't pass through gaps of less than twice the radius.
@@ -56,8 +56,8 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentProperties);
///
API_STRUCT() struct FLAXENGINE_API NavMeshProperties : ISerializable
{
-API_AUTO_SERIALIZATION();
-DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshProperties);
+ API_AUTO_SERIALIZATION();
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshProperties);
///
/// The navmesh type name. Identifies different types of the navmeshes, used to sync navmesh properties with settings asset.
@@ -102,7 +102,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshProperties);
///
API_STRUCT() struct FLAXENGINE_API NavAgentMask
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentMask);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentMask);
///
/// The agents selection mask.
@@ -126,7 +126,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(NavAgentMask);
///
API_STRUCT() struct FLAXENGINE_API NavMeshHit
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshHit);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshHit);
///
/// The hit point position.
@@ -149,8 +149,8 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(NavMeshHit);
///
API_STRUCT() struct FLAXENGINE_API NavAreaProperties : ISerializable
{
-API_AUTO_SERIALIZATION();
-DECLARE_SCRIPTING_TYPE_MINIMAL(NavAreaProperties);
+ API_AUTO_SERIALIZATION();
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NavAreaProperties);
///
/// The area type name. Identifies different types of the areas.
diff --git a/Source/Engine/Networking/INetworkDriver.h b/Source/Engine/Networking/INetworkDriver.h
index 7aaecf50a..71d7aee0e 100644
--- a/Source/Engine/Networking/INetworkDriver.h
+++ b/Source/Engine/Networking/INetworkDriver.h
@@ -11,9 +11,8 @@
///
API_INTERFACE(Namespace="FlaxEngine.Networking") class FLAXENGINE_API INetworkDriver
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(INetworkDriver);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(INetworkDriver);
public:
-
///
/// Finalizes an instance of the class.
///
@@ -26,7 +25,7 @@ public:
{
return String("Unknown");
}
-
+
///
/// Initializes the instance of this network driver using given configuration.
///
@@ -84,7 +83,7 @@ public:
/// Do not recycle the message after calling this.
/// This function automatically recycles the message.
///
- API_FUNCTION() virtual void SendMessage(NetworkChannelType channelType, const NetworkMessage& message) = 0;
+ API_FUNCTION() virtual void SendMessage(NetworkChannelType channelType, const NetworkMessage& message) = 0;
///
/// Sends given message over specified channel to the given client connection (target).
diff --git a/Source/Engine/Networking/NetworkConfig.h b/Source/Engine/Networking/NetworkConfig.h
index be65b1add..84a688229 100644
--- a/Source/Engine/Networking/NetworkConfig.h
+++ b/Source/Engine/Networking/NetworkConfig.h
@@ -28,7 +28,7 @@ API_ENUM(Namespace="FlaxEngine.Networking") enum class DEPRECATED NetworkDriverT
///
API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkConfig
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkConfig);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkConfig);
///
/// The network driver that will be used to create the peer.
diff --git a/Source/Engine/Networking/NetworkConnection.h b/Source/Engine/Networking/NetworkConnection.h
index 169d88135..1eb2b634d 100644
--- a/Source/Engine/Networking/NetworkConnection.h
+++ b/Source/Engine/Networking/NetworkConnection.h
@@ -9,7 +9,7 @@
///
API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkConnection
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkConnection);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkConnection);
public:
///
/// The identifier of the connection.
diff --git a/Source/Engine/Networking/NetworkEvent.h b/Source/Engine/Networking/NetworkEvent.h
index cba98ec42..63f637ad7 100644
--- a/Source/Engine/Networking/NetworkEvent.h
+++ b/Source/Engine/Networking/NetworkEvent.h
@@ -42,7 +42,7 @@ API_ENUM(Namespace="FlaxEngine.Networking") enum class NetworkEventType
///
API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkEvent
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkEvent);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkEvent);
public:
///
/// The type of the received event.
diff --git a/Source/Engine/Networking/NetworkMessage.h b/Source/Engine/Networking/NetworkMessage.h
index 6f9202a69..f83f9b828 100644
--- a/Source/Engine/Networking/NetworkMessage.h
+++ b/Source/Engine/Networking/NetworkMessage.h
@@ -14,9 +14,8 @@
///
API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkMessage
{
-DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkMessage);
+ DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkMessage);
public:
-
///
/// The raw message buffer.
///
@@ -43,7 +42,6 @@ public:
API_FIELD() uint32 Position = 0;
public:
-
///
/// Initializes default values of the structure.
///
@@ -53,13 +51,17 @@ public:
/// Initializes values of the structure.
///
NetworkMessage(uint8* buffer, uint32 messageId, uint32 bufferSize, uint32 length, uint32 position)
- : Buffer(buffer), MessageId(messageId), BufferSize(bufferSize), Length(length), Position(position)
- { }
+ : Buffer(buffer)
+ , MessageId(messageId)
+ , BufferSize(bufferSize)
+ , Length(length)
+ , Position(position)
+ {
+ }
~NetworkMessage() = default;
-
-public:
+public:
///
/// Writes raw bytes into the message.
///
@@ -119,7 +121,7 @@ public:
{
return Vector2(ReadSingle(), ReadSingle());
}
-
+
///
/// Writes data of type Vector3 into the message.
///
@@ -156,7 +158,7 @@ public:
{
return Vector4(ReadSingle(), ReadSingle(), ReadSingle(), ReadSingle());
}
-
+
///
/// Writes data of type Quaternion into the message.
///
@@ -196,7 +198,7 @@ public:
ReadBytes((uint8*)value.Get(), length * sizeof(Char));
return value;
}
-
+
///
/// Writes data of type Guid into the message.
///
@@ -216,7 +218,6 @@ public:
}
public:
-
///
/// Returns true if the message is valid for reading or writing.
///
diff --git a/Source/Engine/Networking/NetworkPeer.h b/Source/Engine/Networking/NetworkPeer.h
index b42e42b5a..3cc6f6d8b 100644
--- a/Source/Engine/Networking/NetworkPeer.h
+++ b/Source/Engine/Networking/NetworkPeer.h
@@ -13,10 +13,9 @@
///
API_CLASS(sealed, NoSpawn, Namespace = "FlaxEngine.Networking") class FLAXENGINE_API NetworkPeer final : public ScriptingObject
{
-DECLARE_SCRIPTING_TYPE_NO_SPAWN(NetworkPeer);
+ DECLARE_SCRIPTING_TYPE_NO_SPAWN(NetworkPeer);
friend class NetworkManager;
public:
-
int HostId = -1;
NetworkConfig Config;
INetworkDriver* NetworkDriver = nullptr;
@@ -25,7 +24,6 @@ public:
Array MessagePool;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -35,7 +33,6 @@ public:
}
public:
-
///
/// Starts listening for incoming connections.
/// Once this is called, this peer becomes a server.
@@ -163,7 +160,6 @@ public:
static void ShutdownPeer(NetworkPeer* peer);
public:
-
bool IsValid() const
{
return NetworkDriver != nullptr && HostId >= 0;
@@ -176,7 +172,6 @@ public:
}
public:
-
FORCE_INLINE bool operator==(const NetworkPeer& other) const
{
return HostId == other.HostId;
@@ -188,7 +183,6 @@ public:
}
private:
-
bool Initialize(const NetworkConfig& config);
void Shutdown();
void CreateMessageBuffers();
diff --git a/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h b/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h
index 5ffb4ea07..b1738ea49 100644
--- a/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h
+++ b/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h
@@ -37,7 +37,6 @@ class ParticleEmitterGraphCPUBox : public VisjectGraphBox
class ParticleEmitterGraphCPUNode : public ParticleEmitterGraphNode>
{
public:
-
///
/// The sorted indices buffer offset used by the rendering modules to point the sorted indices buffer start to use for rendering.
///
@@ -66,7 +65,6 @@ class ParticleEmitterGraphCPU : public ParticleEmitterGraph, ParticleEmitterGraphCPUNode, Variant> Base;
private:
-
struct NodeState
{
union
@@ -74,10 +72,10 @@ private:
int32 SpiralProgress;
};
};
+
Array _defaultParticleData;
public:
-
// Size of the custom pre-node data buffer used for state tracking (eg. position on spiral arc progression).
int32 CustomDataSize = 0;
@@ -103,7 +101,6 @@ public:
}
public:
-
// [ParticleEmitterGraph]
bool Load(ReadStream* stream, bool loadMeta) override;
void InitializeNode(Node* node) override;
@@ -138,7 +135,6 @@ private:
static ThreadLocal Context;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -186,7 +182,6 @@ public:
int32 UpdateSpawn(ParticleEmitter* emitter, ParticleEffect* effect, ParticleEmitterInstance& data, float dt);
private:
-
void Init(ParticleEmitter* emitter, ParticleEffect* effect, ParticleEmitterInstance& data, float dt = 0.0f);
Value eatBox(Node* caller, Box* box) override;
Graph* GetCurrentGraph() const override;
diff --git a/Source/Engine/Particles/Graph/GPU/GPUParticles.h b/Source/Engine/Particles/Graph/GPU/GPUParticles.h
index 8ff6ec56d..6d81d6d88 100644
--- a/Source/Engine/Particles/Graph/GPU/GPUParticles.h
+++ b/Source/Engine/Particles/Graph/GPU/GPUParticles.h
@@ -23,14 +23,12 @@ class GPUShaderProgramCS;
class GPUParticles
{
private:
-
GPUShader* _shader = nullptr;
GPUShaderProgramCS* _mainCS = nullptr;
Array _cbData;
MaterialParams _params;
public:
-
///
/// The custom data size (in bytes) required by the nodes to store the additional global state for the simulation in the particles buffer on a GPU.
///
diff --git a/Source/Engine/Particles/Graph/GPU/ParticleEmitterGraph.GPU.h b/Source/Engine/Particles/Graph/GPU/ParticleEmitterGraph.GPU.h
index 988883965..5f220915e 100644
--- a/Source/Engine/Particles/Graph/GPU/ParticleEmitterGraph.GPU.h
+++ b/Source/Engine/Particles/Graph/GPU/ParticleEmitterGraph.GPU.h
@@ -18,7 +18,6 @@ typedef ShaderGraphBox ParticleEmitterGraphGPUBox;
class ParticleEmitterGraphGPUNode : public ParticleEmitterGraphNode>
{
public:
-
ParticleEmitterGraphGPUNode()
: ParticleEmitterGraphNode>()
{
@@ -37,7 +36,6 @@ public:
class ParticleEmitterGraphGPU : public ParticleEmitterGraph, ParticleEmitterGraphGPUNode, ShaderGraphValue>
{
public:
-
///
/// Clears all the cached values.
///
@@ -56,7 +54,6 @@ public:
class ParticleEmitterGPUGenerator : public ShaderGenerator
{
private:
-
enum class ParticleContextType
{
Initialize,
@@ -84,7 +81,6 @@ private:
Array> _graphs;
public:
-
///
/// Initializes a new instance of the class.
///
@@ -120,7 +116,6 @@ public:
bool Generate(WriteStream& source, BytesContainer& parametersData, int32& customDataSize);
private:
-
void clearCache();
void ProcessModule(Node* node);