当前位置: 首页>>代码示例>>C#>>正文


C# RenderHelper.RenderUserPrimitive方法代码示例

本文整理汇总了C#中RenderHelper.RenderUserPrimitive方法的典型用法代码示例。如果您正苦于以下问题:C# RenderHelper.RenderUserPrimitive方法的具体用法?C# RenderHelper.RenderUserPrimitive怎么用?C# RenderHelper.RenderUserPrimitive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RenderHelper的用法示例。


在下文中一共展示了RenderHelper.RenderUserPrimitive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

 /// <summary>
 /// Draws the box.
 /// </summary>
 /// <param name="render">The render.</param>
 /// <param name="view">The viewing matrix.</param>
 /// <param name="projection">The projection matrix.</param>
 public void Draw(RenderHelper render, Matrix view, Matrix projection)
 {
     if (Visible)
     {
         if (verts.Count == 0)
             return;
         //// Setup the effect.                
         effect.View = view;
         effect.Projection = projection;                                   
         render.RenderUserPrimitive<VertexPositionColor>(effect,PrimitiveType.LineList, verts.ToArray(), 0, verts.Count() / 2);
         
     }
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:19,代码来源:DebugLines.cs

示例2: Draw

            public void Draw(RenderHelper render,ICamera2D cam)
            {
                render.SetSamplerState(SamplerState.AnisotropicWrap,0);
                render.PushRasterizerState(RasterizerState.CullNone);
                _basicEffect.Projection = cam.SimProjection;
                _basicEffect.View = cam.SimView;
                render.RenderUserPrimitive(_basicEffect,PrimitiveType.TriangleList, _borderVerts, 0, 8);

                render.PopRasterizerState();
                
            }        
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:11,代码来源:Border.cs

示例3: Draw

 /// <summary>
 /// Draws the box.
 /// </summary>
 /// <param name="render">The render.</param>
 /// <param name="view">The viewing matrix.</param>
 /// <param name="projection">The projection matrix.</param>
 public void Draw(RenderHelper render, Matrix view, Matrix projection)
 {
     if (Visible)
     {                
         //// Setup the effect.                
         effect.View = view;
         effect.Projection = projection;
         verts[0].Position = StartPoint;
         verts[0].Color = Color;
         verts[1].Position = EndPoint;
         verts[1].Color = Color;                        
         render.RenderUserPrimitive<VertexPositionColor>(effect,PrimitiveType.LineList, verts, 0, verts.Count() / 2);
         
     }
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:21,代码来源:DebugLine.cs


注:本文中的RenderHelper.RenderUserPrimitive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。