C# Class EzGame.Perspective.Planar.TextureLoader

Loads textures without use of the content pipeline. Needed to load textures with alpha/transparency properly. Based on: http://jakepoz.com/jake_poznanski__background_load_xna.html and http://gamedev.stackexchange.com/questions/35460/load-texture-from-image-content-in-runtime
Inheritance: IDisposable
Mostrar archivo Open project: CodeTreeCommunity/Shooter2D

Public Methods

Method Description
Dispose ( ) : void
FromFile ( string path, bool preMultiplyAlpha = true ) : Microsoft.Xna.Framework.Graphics.Texture2D
FromStream ( Stream stream, bool preMultiplyAlpha = true ) : Microsoft.Xna.Framework.Graphics.Texture2D
TextureLoader ( GraphicsDevice graphicsDevice ) : System

Private Methods

Method Description
TextureLoader ( ) : System

Method Details

Dispose() public method

public Dispose ( ) : void
return void

FromFile() public method

public FromFile ( string path, bool preMultiplyAlpha = true ) : Microsoft.Xna.Framework.Graphics.Texture2D
path string
preMultiplyAlpha bool
return Microsoft.Xna.Framework.Graphics.Texture2D

FromStream() public method

public FromStream ( Stream stream, bool preMultiplyAlpha = true ) : Microsoft.Xna.Framework.Graphics.Texture2D
stream Stream
preMultiplyAlpha bool
return Microsoft.Xna.Framework.Graphics.Texture2D

TextureLoader() public method

public TextureLoader ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice
return System