Fusion.Engine.Graphics.TargetTexture.TargetTexture C# (CSharp) 메소드

TargetTexture() 공개 메소드

Create target texture with specified size and format
public TargetTexture ( RenderSystem rs, int width, int height, TargetFormat format ) : System
rs RenderSystem
width int
height int
format TargetFormat
리턴 System
		public TargetTexture ( RenderSystem rs, int width, int height, TargetFormat format )
		{
			this.Width	=	width;
			this.Height	=	height;
			this.Format	=	format;

			var clrFrmt	=	ColorFormat.Unknown;
			var samples	=	1;

			switch (format) {
				case TargetFormat.LowDynamicRange		: clrFrmt = ColorFormat.Rgba8;	break;
				case TargetFormat.LowDynamicRangeMSAA	: clrFrmt = ColorFormat.Rgba8;	samples = 4; break;
				case TargetFormat.HighDynamicRange		: clrFrmt = ColorFormat.Rgba16F;	break;
				default: throw new ArgumentException("format");
			}

			RenderTarget	=	new RenderTarget2D( rs.Device, clrFrmt, width, height, samples ); 
			Srv	=	RenderTarget;
		}	
		

Same methods

TargetTexture::TargetTexture ( RenderTarget2D renderTarget ) : System