C# Class Clandestine.Texture

Afficher le fichier Open project: mrmikey/nes Class Usage Examples

Méthodes publiques

Свойство Type Description
Filename string
TexPointer int
bitmap System.Drawing.Bitmap

Méthodes publiques

Méthode Description
Destroy ( ) : void
DoDeferredTextureOperations ( ) : void
ForceDestroyAllTextures ( ) : void
GetTexture ( string name ) : Texture
SetTexture ( string name, Texture texture, bool makeCopy ) : void

Either changes the name of an existing texture (and it's entry in the global texture array), or creates a new texture sharing the data of the existing one but with a different name. (Bitmap object and GL graphics memory is shared.) This call is NOT necessary in ordinary usage! EVERY Texture gets put in the global texture array once created, even if the name assigned is just a Guid.

ALL Textures already exist in the global texture array! This call is NOT necessary in ordinary Texture usage! Textures created using the new Texture(Bitmap) constructor have a GUID assigned.

Texture ( Bitmap bitmap ) : System
Texture ( Bitmap bitmap, bool treatAsIndexed ) : System
Texture ( string bitmapFilename ) : System
Texture ( string identifier, Bitmap bitmap ) : System
Texture ( string identifier, Bitmap bitmap, bool treatAsIndexed ) : System
TextureExists ( string name ) : bool
createNewGlTexture ( ) : void

Private Methods

Méthode Description
ChromaKey32bppBitmap ( Bitmap bmp, Color chroma ) : void
ChromaKeyIfNecessary ( Bitmap bmp, bool treatAsIndexed ) : Bitmap
ConvertTo32bppBitmap ( Bitmap bmp ) : Bitmap
Texture ( ) : System
doDeferredOperations ( ) : void
doDestroy ( ) : void
resizeIfNecessary ( Bitmap bmpOriginal ) : Bitmap

Method Details

Destroy() public méthode

public Destroy ( ) : void
Résultat void

DoDeferredTextureOperations() public static méthode

public static DoDeferredTextureOperations ( ) : void
Résultat void

ForceDestroyAllTextures() public static méthode

public static ForceDestroyAllTextures ( ) : void
Résultat void

GetTexture() public static méthode

public static GetTexture ( string name ) : Texture
name string
Résultat Texture

SetTexture() public static méthode

Either changes the name of an existing texture (and it's entry in the global texture array), or creates a new texture sharing the data of the existing one but with a different name. (Bitmap object and GL graphics memory is shared.) This call is NOT necessary in ordinary usage! EVERY Texture gets put in the global texture array once created, even if the name assigned is just a Guid.
ALL Textures already exist in the global texture array! This call is NOT necessary in ordinary Texture usage! Textures created using the new Texture(Bitmap) constructor have a GUID assigned.
public static SetTexture ( string name, Texture texture, bool makeCopy ) : void
name string
texture Texture
makeCopy bool
Résultat void

Texture() public méthode

public Texture ( Bitmap bitmap ) : System
bitmap System.Drawing.Bitmap
Résultat System

Texture() public méthode

public Texture ( Bitmap bitmap, bool treatAsIndexed ) : System
bitmap System.Drawing.Bitmap
treatAsIndexed bool
Résultat System

Texture() public méthode

public Texture ( string bitmapFilename ) : System
bitmapFilename string
Résultat System

Texture() public méthode

public Texture ( string identifier, Bitmap bitmap ) : System
identifier string
bitmap System.Drawing.Bitmap
Résultat System

Texture() public méthode

public Texture ( string identifier, Bitmap bitmap, bool treatAsIndexed ) : System
identifier string
bitmap System.Drawing.Bitmap
treatAsIndexed bool
Résultat System

TextureExists() public static méthode

public static TextureExists ( string name ) : bool
name string
Résultat bool

createNewGlTexture() public méthode

public createNewGlTexture ( ) : void
Résultat void

Property Details

Filename public_oe property

public string Filename
Résultat string

TexPointer public_oe property

public int TexPointer
Résultat int

bitmap public_oe property

public Bitmap,System.Drawing bitmap
Résultat System.Drawing.Bitmap