コード例 #1
0
 public void ClearBackbuffer(VRageMath.Color clearColor)
 {
     var v3 = clearColor.ToVector3();
     MyRender.Device.Clear(ClearFlags.Target, new ColorBGRA(v3.X, v3.Y, v3.Z, 1) , 1, 0);
 }
コード例 #2
0
        internal static void ClearBackbuffer(VRageMath.Color clearColor)
        {
            if(Backbuffer != null)
			{
				var v3 = clearColor.ToVector3();
                DeviceContext.ClearRenderTargetView((Backbuffer as IRenderTargetBindable).RTV, new Color4(v3.X, v3.Y, v3.Z, 1));            
			}
        }
コード例 #3
0
ファイル: MyGbuffer.cs プロジェクト: Chrus/SpaceEngineers
        internal void Clear(VRageMath.Color clearColor)
        {
            MyRender11.DeviceContext.ClearDepthStencilView(DepthStencil.m_DSV,
                DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, MyRender11.DepthClearValue, 0);

            foreach(var res in m_resources)
            {
                var rt = res as IRenderTargetBindable;
                if(rt != null)
				{
					var v3 = clearColor.ToVector3();
                    MyRender11.DeviceContext.ClearRenderTargetView(rt.RTV,
						new Color4(v3.X, v3.Y, v3.Z,1
							));
				}

                var uav = res as IUnorderedAccessBindable;
                if (uav != null)
                    MyRender11.DeviceContext.ClearUnorderedAccessView(uav.UAV, Int4.Zero);
            }
        }
コード例 #4
0
ファイル: MyGbuffer.cs プロジェクト: rem02/SpaceEngineers
        internal void Clear(VRageMath.Color clearColor)
        {
            RC.ClearDsv(DepthStencil,
                DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, MyRender11.DepthClearValue, 0);

			var v3 = clearColor.ToVector3();
            RC.ClearRtv(m_gbuffer0, new Color4(v3.X, v3.Y, v3.Z, 1));
            RC.ClearRtv(m_gbuffer1, Color4.Black);
            RC.ClearRtv(m_gbuffer2, Color4.Black);
            RC.ClearRtv(m_lbuffer, Color4.Black);
    
        }