Ejemplo n.º 1
0
        private static void TransferDataBillboards(int offset, int billboardCount, ref MyBillboardDataArray array)
        {
            var mapping = MyMapping.MapDiscard(RC, m_SB);

            mapping.WriteAndPosition(array.Data, billboardCount, offset);
            mapping.Unmap();

            mapping = MyMapping.MapDiscard(RC, m_VB);
            mapping.WriteAndPosition(array.Vertex, billboardCount, offset);
            mapping.Unmap();
        }
Ejemplo n.º 2
0
        static unsafe void TransferDataBillboards(int offset, int billboardCount, ref MyBillboardDataArray array)
        {
            var mapping = MyMapping.MapDiscard(RC, m_SB.Buffer);

            mapping.WriteAndPosition(array.Data, offset, billboardCount);
            mapping.Unmap();

            mapping = MyMapping.MapDiscard(RC, m_VB.Buffer);
            mapping.WriteAndPosition(array.Vertex, offset, billboardCount);
            mapping.Unmap();
        }
        static unsafe void TransferDataBillboards(int billboardCount, ref MyBillboardDataArray array)
        {
            var mapping = MyMapping.MapDiscard(RC.DeviceContext, m_SB.Buffer);
            mapping.WriteAndPosition(array.Data, 0, billboardCount);
            mapping.Unmap();

            mapping = MyMapping.MapDiscard(RC.DeviceContext, m_VB.Buffer);
            mapping.WriteAndPosition(array.Vertex, 0, billboardCount);
            mapping.Unmap();
        }