C# Class Nez.Textures.RenderTexture

wrapper for a RenderTarget2D that optionally takes care of resizing itself automatcially when the screen size changes
Inheritance: IDisposable
显示文件 Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
renderTarget Microsoft.Xna.Framework.Graphics.RenderTarget2D
resizeBehavior RenderTextureResizeBehavior

Public Methods

Method Description
Dispose ( ) : void
RenderTexture ( ) : System

helper for creating a full screen RenderTarget2D

RenderTexture ( DepthFormat preferredDepthFormat ) : System

helper for creating a full screen RenderTarget2D with a specific DepthFormat

RenderTexture ( int width, int height ) : System

helper for creating a RenderTarget2D

RenderTexture ( int width, int height, DepthFormat preferredDepthFormat ) : System

helper for creating a RenderTarget2D

RenderTexture ( int width, int height, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat ) : System

helper for creating a RenderTarget2D

onSceneBackBufferSizeChanged ( int newWidth, int newHeight ) : void

called by Renderers automatically when appropriate. Lets the resizeBehavior kick in so auto resizing can occur

resize ( int width, int height ) : void

resizes the RenderTarget2D to the specified size

resizeToFitBackbuffer ( ) : void

resizes the RenderTarget2D to match the back buffer size

Method Details

Dispose() public method

public Dispose ( ) : void
return void

RenderTexture() public method

helper for creating a full screen RenderTarget2D
public RenderTexture ( ) : System
return System

RenderTexture() public method

helper for creating a full screen RenderTarget2D with a specific DepthFormat
public RenderTexture ( DepthFormat preferredDepthFormat ) : System
preferredDepthFormat DepthFormat Preferred depth format.
return System

RenderTexture() public method

helper for creating a RenderTarget2D
public RenderTexture ( int width, int height ) : System
width int Width.
height int Height.
return System

RenderTexture() public method

helper for creating a RenderTarget2D
public RenderTexture ( int width, int height, DepthFormat preferredDepthFormat ) : System
width int Width.
height int Height.
preferredDepthFormat DepthFormat Preferred depth format.
return System

RenderTexture() public method

helper for creating a RenderTarget2D
public RenderTexture ( int width, int height, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat ) : System
width int Width.
height int Height.
preferredFormat SurfaceFormat Preferred format.
preferredDepthFormat DepthFormat Preferred depth format.
return System

onSceneBackBufferSizeChanged() public method

called by Renderers automatically when appropriate. Lets the resizeBehavior kick in so auto resizing can occur
public onSceneBackBufferSizeChanged ( int newWidth, int newHeight ) : void
newWidth int New width.
newHeight int New height.
return void

resize() public method

resizes the RenderTarget2D to the specified size
public resize ( int width, int height ) : void
width int Width.
height int Height.
return void

resizeToFitBackbuffer() public method

resizes the RenderTarget2D to match the back buffer size
public resizeToFitBackbuffer ( ) : void
return void

Property Details

renderTarget public_oe property

the RenderTarget2D this RenderTexture manages
public RenderTarget2D,Microsoft.Xna.Framework.Graphics renderTarget
return Microsoft.Xna.Framework.Graphics.RenderTarget2D

resizeBehavior public_oe property

resize behavior that should occur when onSceneBackBufferSizeChanged is called
public RenderTextureResizeBehavior resizeBehavior
return RenderTextureResizeBehavior