M&B: Bannerlord 1.2.10
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.Engine.Texture Class Referencesealed

Representation of 2D texture resource in Mono domain No means of texture copying is provided in this interface so all the accessor properties are read only.

Inherits TaleWorlds.Engine.Resource.

Public Member Functions

void TransformRenderTargetToResource (string name)
 
bool IsLoaded ()
 
void PreloadTexture (bool blocking)
 
void Release ()
 
void ReleaseNextFrame ()
 
void SaveToFile (string path)
 
void SetTextureAsAlwaysValid ()
 

Static Public Member Functions

static Texture CreateTextureFromPath (PlatformFilePath filePath)
 
static Texture GetFromResource (string resourceName)
 
static Texture CheckAndGetFromResource (string resourceName)
 
static void ScaleTextureWithRatio (ref int tableauSizeX, ref int tableauSizeY)
 
static Texture LoadTextureFromPath (string fileName, string folder)
 
static Texture CreateDepthTarget (string name, int width, int height)
 Creates a depth stencil texture.
 
static Texture CreateFromByteArray (byte[] data, int width, int height)
 
static Texture CreateFromMemory (byte[] data)
 
static void ReleaseGpuMemories ()
 
static Texture CreateTableauTexture (string name, RenderTargetComponent.TextureUpdateEventHandler eventHandler, Object objectRef, int tableauSizeX, int tableauSizeY)
 
static Texture CreateRenderTarget (string name, int width, int height, bool autoMipmaps, bool isTableau, bool createUninitialized=false, bool always_valid=false)
 Creates a render target texture.
 

Properties

int Width [get]
 Gets the width of the texture object in pixels.
 
int Height [get]
 Gets the height of the texture object in pixels.
 
int MemorySize [get]
 
bool IsRenderTarget [get]
 Gets a value indicating whether the texture is a render target texture.
 
string Name [get, set]
 Gets the name of the texture.
 
RenderTargetComponent RenderTargetComponent [get]
 
TableauView TableauView [get]
 
object UserData [get]
 
- Properties inherited from TaleWorlds.Engine.Resource
bool IsValid [get]
 

Additional Inherited Members

- Protected Member Functions inherited from TaleWorlds.Engine.Resource
 Resource ()
 
void CheckResourceParameter (Resource param, string paramName="")
 Check if the parameter 'param' is null or invalid and throws an exception containing 'paramName' as further information.
 

Member Function Documentation

◆ CreateTextureFromPath()

static Texture TaleWorlds.Engine.Texture.CreateTextureFromPath ( PlatformFilePath filePath)
static

◆ TransformRenderTargetToResource()

void TaleWorlds.Engine.Texture.TransformRenderTargetToResource ( string name)

◆ GetFromResource()

static Texture TaleWorlds.Engine.Texture.GetFromResource ( string resourceName)
static

◆ IsLoaded()

bool TaleWorlds.Engine.Texture.IsLoaded ( )

◆ CheckAndGetFromResource()

static Texture TaleWorlds.Engine.Texture.CheckAndGetFromResource ( string resourceName)
static

◆ ScaleTextureWithRatio()

static void TaleWorlds.Engine.Texture.ScaleTextureWithRatio ( ref int tableauSizeX,
ref int tableauSizeY )
static

◆ PreloadTexture()

void TaleWorlds.Engine.Texture.PreloadTexture ( bool blocking)

◆ Release()

void TaleWorlds.Engine.Texture.Release ( )

◆ ReleaseNextFrame()

void TaleWorlds.Engine.Texture.ReleaseNextFrame ( )

◆ LoadTextureFromPath()

static Texture TaleWorlds.Engine.Texture.LoadTextureFromPath ( string fileName,
string folder )
static

◆ CreateDepthTarget()

static Texture TaleWorlds.Engine.Texture.CreateDepthTarget ( string name,
int width,
int height )
static

◆ CreateFromByteArray()

static Texture TaleWorlds.Engine.Texture.CreateFromByteArray ( byte[] data,
int width,
int height )
static

◆ SaveToFile()

void TaleWorlds.Engine.Texture.SaveToFile ( string path)

◆ SetTextureAsAlwaysValid()

void TaleWorlds.Engine.Texture.SetTextureAsAlwaysValid ( )

◆ CreateFromMemory()

static Texture TaleWorlds.Engine.Texture.CreateFromMemory ( byte[] data)
static

◆ ReleaseGpuMemories()

static void TaleWorlds.Engine.Texture.ReleaseGpuMemories ( )
static

◆ CreateTableauTexture()

static Texture TaleWorlds.Engine.Texture.CreateTableauTexture ( string name,
RenderTargetComponent.TextureUpdateEventHandler eventHandler,
Object objectRef,
int tableauSizeX,
int tableauSizeY )
static

◆ CreateRenderTarget()

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

Property Documentation

◆ Width

int TaleWorlds.Engine.Texture.Width
get

◆ Height

int TaleWorlds.Engine.Texture.Height
get

◆ MemorySize

int TaleWorlds.Engine.Texture.MemorySize
get

◆ IsRenderTarget

bool TaleWorlds.Engine.Texture.IsRenderTarget
get

◆ Name

string TaleWorlds.Engine.Texture.Name
getset

◆ RenderTargetComponent

RenderTargetComponent TaleWorlds.Engine.Texture.RenderTargetComponent
get

◆ TableauView

TableauView TaleWorlds.Engine.Texture.TableauView
get

◆ UserData

object TaleWorlds.Engine.Texture.UserData
get