Semi Mod Loader
Static Public Member Functions | Static Private Member Functions | List of all members
Semi.Texture2DLoader Class Reference

Static Public Member Functions

static Texture2D LoadTexture2D (byte[] content, string name)
 Load a 2D texture from a byte array. More...
 
static Texture2D LoadTexture2D (string path)
 Load a 2D texture from a file. More...
 
static bool IsPowerOfTwo (Texture2D tex)
 Checks if both of the texture's dimensions are powers of two. More...
 
static bool IsEqualPowerOfTwo (Texture2D tex)
 Checks if both of the texture's dimensions are powers of two and equal. More...
 

Static Private Member Functions

static bool _IsPoT (int n)
 

Member Function Documentation

◆ _IsPoT()

static bool Semi.Texture2DLoader._IsPoT ( int  n)
inlinestaticprivate

◆ IsEqualPowerOfTwo()

static bool Semi.Texture2DLoader.IsEqualPowerOfTwo ( Texture2D  tex)
inlinestatic

Checks if both of the texture's dimensions are powers of two and equal.

Returns
true, if both the width and height are equal and powers of two, false otherwise.
Parameters
texTarget texture.

◆ IsPowerOfTwo()

static bool Semi.Texture2DLoader.IsPowerOfTwo ( Texture2D  tex)
inlinestatic

Checks if both of the texture's dimensions are powers of two.

Returns
true, if both the width and height are powers of two, false otherwise.
Parameters
texTarget texture.

◆ LoadTexture2D() [1/2]

static Texture2D Semi.Texture2DLoader.LoadTexture2D ( byte[]  content,
string  name 
)
inlinestatic

Load a 2D texture from a byte array.

Returns
A new texture.
Parameters
contentArray of the bytes that make up the image.
nameName of the texture.

◆ LoadTexture2D() [2/2]

static Texture2D Semi.Texture2DLoader.LoadTexture2D ( string  path)
inlinestatic

Load a 2D texture from a file.

Returns
A new texture.
Parameters
pathPath to the file.

The documentation for this class was generated from the following file: