本文整理汇总了C#中VRageMath.ToVector3方法的典型用法代码示例。如果您正苦于以下问题:C# VRageMath.ToVector3方法的具体用法?C# VRageMath.ToVector3怎么用?C# VRageMath.ToVector3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VRageMath
的用法示例。
在下文中一共展示了VRageMath.ToVector3方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClearBackbuffer
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: ClearBackbuffer
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: Clear
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: Clear
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);
}