C# Class Sparrow.Textures.RenderTexture

Inheritance: SubTexture
显示文件 Open project: fmotagarcia/sparrow-sharp

Public Methods

Method Description
Clear ( uint color, float alpha ) : void

Clears the texture with a certain color and alpha value.

DrawBundled ( System.Action block ) : void

Bundles several calls to 'drawObject' together in a block. This avoids framebuffer switches.

DrawObject ( DisplayObject obj ) : void

Draws an object onto the texture, adhering its properties for position, scale, rotation and alpha.

RenderTexture ( float width, float height, uint argbFillColor = 0x0, float scale = 1.0f ) : System

Initializes a render texture with a certain ARGB color (0xAARRGGBB) and a scale factor.

Method Details

Clear() public method

Clears the texture with a certain color and alpha value.
public Clear ( uint color, float alpha ) : void
color uint
alpha float
return void

DrawBundled() public method

Bundles several calls to 'drawObject' together in a block. This avoids framebuffer switches.
public DrawBundled ( System.Action block ) : void
block System.Action
return void

DrawObject() public method

Draws an object onto the texture, adhering its properties for position, scale, rotation and alpha.
public DrawObject ( DisplayObject obj ) : void
obj Sparrow.Display.DisplayObject
return void

RenderTexture() public method

Initializes a render texture with a certain ARGB color (0xAARRGGBB) and a scale factor.
public RenderTexture ( float width, float height, uint argbFillColor = 0x0, float scale = 1.0f ) : System
width float
height float
argbFillColor uint
scale float
return System