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
IsRenderTarget
public bool IsRenderTarget { get; }
Property Value
MemorySize
public int MemorySize { get; }
Property Value
Name
public string Name { get; set; }
Property Value
RenderTargetComponent
public RenderTargetComponent RenderTargetComponent { get; }
Property Value
TableauView
public TableauView TableauView { get; }
Property Value
UserData
public object UserData { get; }
Property Value
Width
public int Width { get; }
Property Value
Methods
CheckAndGetFromResource(string)
public static Texture CheckAndGetFromResource(string resourceName)
Parameters
resourceName
string
Returns
CreateDepthTarget(string, int, int)
public static Texture CreateDepthTarget(string name, int width, int height)
Parameters
Returns
CreateFromByteArray(byte[], int, int)
public static Texture CreateFromByteArray(byte[] data, int width, int height)
Parameters
Returns
CreateFromMemory(byte[])
public static Texture CreateFromMemory(byte[] data)
Parameters
data
byte[]
Returns
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
stringwidth
intheight
intautoMipmaps
boolisTableau
boolcreateUninitialized
boolalways_valid
bool
Returns
CreateTableauTexture(string, TextureUpdateEventHandler, object, int, int)
public static Texture CreateTableauTexture(string name, RenderTargetComponent.TextureUpdateEventHandler eventHandler, object objectRef, int tableauSizeX, int tableauSizeY)
Parameters
name
stringeventHandler
RenderTargetComponent.TextureUpdateEventHandlerobjectRef
objecttableauSizeX
inttableauSizeY
int
Returns
CreateTextureFromPath(PlatformFilePath)
public static Texture CreateTextureFromPath(PlatformFilePath filePath)
Parameters
filePath
PlatformFilePath
Returns
GetFromResource(string)
public static Texture GetFromResource(string resourceName)
Parameters
resourceName
string
Returns
IsLoaded()
public bool IsLoaded()
Returns
LoadTextureFromPath(string, string)
public static Texture LoadTextureFromPath(string fileName, string folder)
Parameters
Returns
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
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).