Search Results for

    Show / Hide Table of Contents

    Class GPUResource

    The base class for all GPU resources.

    Inheritance
    Object
    ScriptingObject
    GPUResource
    Inherited Members
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    ScriptingObject::_type
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    ScriptingObject::DestroyManaged()
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    ScriptingObject::GetClass()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    ScriptingObject::GetOrCreateManagedInstance()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    ScriptingObject::HasManagedInstance()
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    ScriptingObject::IsRegistered()
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    ScriptingObject::OnManagedInstanceDeleted()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    ScriptingObject::SetManagedInstance(MObject* instance)
    GPUResource
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::UnregisterObject()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/GPUResource.h
    Syntax
    public class GPUResource : public ScriptingObject

    Constructors

    ~GPUResource()

    Finalizes an instance of the GPUResource class.

    Declaration
    public virtual ~GPUResource()

    GPUResource()

    Initializes a new instance of the GPUResource class.

    Declaration
    public GPUResource()

    GPUResource(const SpawnParams& params)

    Initializes a new instance of the GPUResource class.

    Declaration
    public GPUResource(const SpawnParams& params)
    Parameters
    SpawnParams params

    The object initialization parameters.

    Fields

    _memoryUsage

    Declaration
    protected uint64 _memoryUsage = 0
    Field Value
    uint64

    _nameCapacity

    Declaration
    protected int32 _nameCapacity = 0
    Field Value
    int32

    _namePtr

    Declaration
    protected Char* _namePtr = nullptr
    Field Value
    Char

    _nameSize

    Declaration
    protected int32 _nameSize = 0
    Field Value
    int32

    LastRenderTime

    Declaration
    public double LastRenderTime = -1
    Field Value
    double

    Releasing

    Action fired when resource GPU state gets released. All objects and async tasks using this resource should release references to this object nor use its data.

    Declaration
    public Action Releasing
    Field Value
    Action

    Methods

    GetMemoryUsage()

    Gets amount of GPU memory used by this resource (in bytes). It's a rough estimation. GPU memory may be fragmented, compressed or sub-allocated so the actual memory pressure from this resource may vary (also depends on the current graphics backend).

    Declaration
    public uint64 GetMemoryUsage() const
    Returns
    uint64

    GetName()

    Gets the resource name.

    Declaration
    public StringView GetName() const
    Returns
    StringView

    GetResourceType()

    Gets the GPU resource type.

    Declaration
    public virtual GPUResourceType GetResourceType() const = 0
    Returns
    GPUResourceType

    OnDeleteObject()

    Deletes the object. Called by the ObjectsRemovalService. Can be overriden to provide custom logic per object (cleanup, etc.).

    Declaration
    public virtual void OnDeleteObject() override
    Overrides
    Object::OnDeleteObject()

    OnDeviceDispose()

    Action called when GPU device is disposing.

    Declaration
    public virtual void OnDeviceDispose()

    OnReleaseGPU()

    Releases GPU resource data (implementation).

    Declaration
    protected virtual void OnReleaseGPU()

    ReleaseGPU()

    Releases GPU resource data.

    Declaration
    public void ReleaseGPU()

    SetName(const StringView& name)

    Sets the resource name.

    Declaration
    public void SetName(const StringView& name)
    Parameters
    StringView name

    ToString()

    Gets the string representation of this object.

    Declaration
    public virtual String ToString() const override
    Returns
    String

    Overrides
    Object::ToString()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat