Refactor native core objects to simplify usage for newcomers

This commit is contained in:
Wojtek Figat
2022-01-07 13:16:36 +01:00
parent e144a6f69d
commit 192af7ec14
47 changed files with 204 additions and 249 deletions

View File

@@ -15,7 +15,7 @@
/// <summary>
/// The base class for all GPU resources.
/// </summary>
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API GPUResource : public PersistentScriptingObject
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API GPUResource : public ScriptingObject
{
DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUResource);
public:
@@ -108,7 +108,7 @@ protected:
public:
// [PersistentScriptingObject]
// [ScriptingObject]
String ToString() const override;
void OnDeleteObject() override;
};
@@ -186,14 +186,14 @@ public:
/// <summary>
/// Interface for GPU resources views. Shared base class for texture and buffer views.
/// </summary>
API_CLASS(Abstract, NoSpawn, Attributes="HideInEditor") class FLAXENGINE_API GPUResourceView : public PersistentScriptingObject
API_CLASS(Abstract, NoSpawn, Attributes="HideInEditor") class FLAXENGINE_API GPUResourceView : public ScriptingObject
{
DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUResourceView);
protected:
static double DummyLastRenderTime;
explicit GPUResourceView(const SpawnParams& params)
: PersistentScriptingObject(params)
: ScriptingObject(params)
, LastRenderTime(&DummyLastRenderTime)
{
}