Table of Contents

Class Texture

Namespace
TaleWorlds.Engine
Assembly
TaleWorlds.Engine.dll
public sealed class Texture : Resource
Inheritance
Texture
Inherited Members

Properties

Height

public int Height { get; }

Property Value

int

IsRenderTarget

public bool IsRenderTarget { get; }

Property Value

bool

MemorySize

public int MemorySize { get; }

Property Value

int

Name

public string Name { get; set; }

Property Value

string

RenderTargetComponent

public RenderTargetComponent RenderTargetComponent { get; }

Property Value

RenderTargetComponent

TableauView

public TableauView TableauView { get; }

Property Value

TableauView

UserData

public object UserData { get; }

Property Value

object

Width

public int Width { get; }

Property Value

int

Methods

CheckAndGetFromResource(string)

public static Texture CheckAndGetFromResource(string resourceName)

Parameters

resourceName string

Returns

Texture

CreateDepthTarget(string, int, int)

public static Texture CreateDepthTarget(string name, int width, int height)

Parameters

name string
width int
height int

Returns

Texture

CreateFromByteArray(byte[], int, int)

public static Texture CreateFromByteArray(byte[] data, int width, int height)

Parameters

data byte[]
width int
height int

Returns

Texture

CreateFromMemory(byte[])

public static Texture CreateFromMemory(byte[] data)

Parameters

data byte[]

Returns

Texture

CreateRenderTarget(string, int, int, bool, bool, bool, bool)

public static Texture CreateRenderTarget(string name, int width, int height, bool autoMipmaps, bool isTableau, bool createUninitialized = false, bool always_valid = false)

Parameters

name string
width int
height int
autoMipmaps bool
isTableau bool
createUninitialized bool
always_valid bool

Returns

Texture

CreateTableauTexture(string, TextureUpdateEventHandler, object, int, int)

public static Texture CreateTableauTexture(string name, RenderTargetComponent.TextureUpdateEventHandler eventHandler, object objectRef, int tableauSizeX, int tableauSizeY)

Parameters

name string
eventHandler RenderTargetComponent.TextureUpdateEventHandler
objectRef object
tableauSizeX int
tableauSizeY int

Returns

Texture

CreateTextureFromPath(PlatformFilePath)

public static Texture CreateTextureFromPath(PlatformFilePath filePath)

Parameters

filePath PlatformFilePath

Returns

Texture

GetFromResource(string)

public static Texture GetFromResource(string resourceName)

Parameters

resourceName string

Returns

Texture

IsLoaded()

public bool IsLoaded()

Returns

bool

LoadTextureFromPath(string, string)

public static Texture LoadTextureFromPath(string fileName, string folder)

Parameters

fileName string
folder string

Returns

Texture

PreloadTexture(bool)

public void PreloadTexture(bool blocking)

Parameters

blocking bool

Release()

public void Release()

ReleaseGpuMemories()

public static void ReleaseGpuMemories()

ReleaseNextFrame()

public void ReleaseNextFrame()

SaveToFile(string)

public void SaveToFile(string path)

Parameters

path string

ScaleTextureWithRatio(ref int, ref int)

public static void ScaleTextureWithRatio(ref int tableauSizeX, ref int tableauSizeY)

Parameters

tableauSizeX int
tableauSizeY int

SetTextureAsAlwaysValid()

public void SetTextureAsAlwaysValid()

TransformRenderTargetToResource(string)

public void TransformRenderTargetToResource(string name)

Parameters

name string

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).