internal unsafe void Update(MyRenderMessageDebugDrawMesh message)
        {
            edges = !message.Shaded;
            depth = message.DepthRead;

            if (message.VertexCount > vbuffer.Capacity)
            {
                MyHwBuffers.ResizeVertexBuffer(vbuffer, message.VertexCount);
            }

            var mapping = MyMapping.MapDiscard(MyPrimitivesRenderer.RC.DeviceContext, vbuffer.Buffer);
            for (int i = 0; i < message.VertexCount; i++)
            {
                MyVertexFormatPositionColor vert = new MyVertexFormatPositionColor(Vector3.Transform(message.Vertices[i].Position, message.WorldMatrix), message.Vertices[i].Color);
                mapping.WriteAndPosition(ref vert);
            }
            mapping.Unmap();

            message.Vertices.Clear();
        }
 internal void Add(MyVertexFormatPositionColor from, MyVertexFormatPositionColor to)
 {
     MyLinesRenderer.m_lineVertexList.Add(from);
     MyLinesRenderer.m_lineVertexList.Add(to);
 }
Exemplo n.º 3
0
 internal void Add(MyVertexFormatPositionColor from, MyVertexFormatPositionColor to)
 {
     List.Add(from);
     List.Add(to);
 }
 internal void Add(MyVertexFormatPositionColor v)
 {
     MyLinesRenderer.m_lineVertexList.Add(v);
 }
Exemplo n.º 5
0
 internal void Add(MyVertexFormatPositionColor v)
 {
     List.Add(v);
 }