예제 #1
0
		protected Composition(Context context, Texture texture, Depth depth, FrameBuffer frameBuffer) :
			base(context)
		{
			this.Size = texture.Size;
			this.Type = texture.Type;
			this.Texture = texture;
			this.Depth = depth;
			this.FrameBuffer = frameBuffer;
			this.Create();
			this.Texture.Composition = this;
			this.Renderer = this.CreateRenderer(this.Context, () => this.Size, () => this.Type);
		}
예제 #2
0
		protected Composition(Composition original) :
			base(original)
		{
			this.Size = original.Size;
			this.Type = original.Type;
			this.Texture = original.Texture.Refurbish();
			this.Texture.Composition = this;
			original.Texture.Composition = null;
			original.Texture = null;
			this.Depth = original.Depth.Refurbish();
			original.Depth = null;
			this.FrameBuffer = original.FrameBuffer.Refurbish();
			original.FrameBuffer = null;
			this.Renderer = original.Renderer.Refurbish();
			original.Renderer = null;
		}
예제 #3
0
		protected FrameBuffer(FrameBuffer original) :
			base(original)
		{
			this.Identifier = original.Identifier;
			original.Identifier = 0;
		}
예제 #4
0
		internal void Delete(FrameBuffer frameBuffer)
		{
			this.frameBufferBin.Add(frameBuffer);
		}
예제 #5
0
		protected override void Dispose(bool disposing)
		{
			if (this.Texture.NotNull() && this.Texture.Identifier != 0 && this.Depth.NotNull() && this.Depth.Identifier != 0 && this.FrameBuffer.NotNull() && this.FrameBuffer.Identifier != 0)
				this.Context.Recycle(this);
			else
			{
				if (this.Texture.NotNull())
				{
					this.Texture.Composition = null;
					this.Context.Delete(this.Texture);
					this.Texture = null;
				}
				if (this.Depth.NotNull())
				{
					this.Context.Delete(this.Depth);
					this.Depth = null;
				}
				if (this.FrameBuffer.NotNull())
				{
					this.Context.Delete(this.FrameBuffer);
					this.FrameBuffer = null;
				}
			}
		}
예제 #6
0
		protected internal override void Delete()
		{
			if (this.Renderer.NotNull())
				this.Renderer = null;
			if (this.Texture.NotNull())
			{
				this.Texture.Composition = null;
				this.Texture.Delete();
				this.Texture = null;
			}
			if (this.Depth.NotNull())
			{
				this.Depth.Delete();
				this.Depth = null;
			}
			if (this.FrameBuffer.NotNull())
			{
				this.FrameBuffer.Delete();
				this.FrameBuffer = null;
			}
		}