Search Results for

    Show / Hide Table of Contents

    Class TextureData

    Texture data container (used to keep data downloaded from the GPU).

    Inheritance
    Object
    ScriptingObject
    TextureData
    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::OnDeleteObject()
    ScriptingObject::OnManagedInstanceDeleted()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    ScriptingObject::SetManagedInstance(MObject* instance)
    TextureData
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::ToString()
    ScriptingObject::UnregisterObject()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Textures/TextureData.h
    Syntax
    public class TextureData : public ScriptingObject

    Fields

    Depth

    Top level texture surface depth (in pixels).

    Declaration
    public int32 Depth = 0
    Field Value
    int32

    Format

    The texture data format.

    Declaration
    public PixelFormat Format = PixelFormat::Unknown
    Field Value
    PixelFormat

    Height

    Top level texture surface height (in pixels).

    Declaration
    public int32 Height = 0
    Field Value
    int32

    Items

    The items collection (depth slices or array slices).

    Declaration
    public Array<ArrayEntry, InlinedAllocation<6>> Items
    Field Value
    Array<ArrayEntry, InlinedAllocation<6>>

    Width

    Top level texture surface width (in pixels).

    Declaration
    public int32 Width = 0
    Field Value
    int32

    Methods

    Clear()

    Clear allocated memory.

    Declaration
    public void Clear()

    GetArraySize()

    Gets amount of texture slices in the array.

    Declaration
    public int32 GetArraySize() const
    Returns
    int32

    GetData(int32 arrayIndex, int32 mipLevel)

    Gather texture data

    Declaration
    public TextureMipData* GetData(int32 arrayIndex, int32 mipLevel)
    Parameters
    int32 arrayIndex

    Texture array index

    int32 mipLevel

    Mip map index

    Returns
    TextureMipData

    Result data

    GetMipLevels()

    Gets amount of mip maps in the texture.

    Declaration
    public int32 GetMipLevels() const
    Returns
    int32

    GetPixels(Array<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)

    Gets the texture pixels as Color array.

    Supported only for 'basic' texture formats (uncompressed, single plane).

    Declaration
    public bool GetPixels(Array<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    Parameters
    Array<Color> pixels

    The result texture pixels array.

    int32 mipIndex

    The mip index (zero-based).

    int32 arrayIndex

    The array or depth slice index (zero-based).

    Returns
    bool

    True if failed, otherwise false.

    GetPixels(Array<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)

    Gets the texture pixels as Color32 array.

    Supported only for 'basic' texture formats (uncompressed, single plane).

    Declaration
    public bool GetPixels(Array<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    Parameters
    Array<Color32> pixels

    The result texture pixels array.

    int32 mipIndex

    The mip index (zero-based).

    int32 arrayIndex

    The array or depth slice index (zero-based).

    Returns
    bool

    True if failed, otherwise false.

    • Improve this Doc
    • View Source
    In This Article
    • Fields
      • Depth
      • Format
      • Height
      • Items
      • Width
    • Methods
      • Clear()
      • GetArraySize()
      • GetData(int32 arrayIndex, int32 mipLevel)
      • GetMipLevels()
      • GetPixels(Array<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
      • GetPixels(Array<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    Back to top Copyright © 2012-2024 Wojciech Figat