Exemplo n.º 1
0
        public void SetIndices <T>(T[] indices, IndexFormat format, int stride, int elementOffset) where T : struct
        {
            _format = D3DFormats.ConvertIndexFormat(format);
            int elementSizeInBytes = Unsafe.SizeOf <T>();

            SetData(indices, elementSizeInBytes * indices.Length, elementOffset * elementSizeInBytes);
        }
Exemplo n.º 2
0
 public override IndexBuffer CreateIndexBuffer(int sizeInBytes, bool isDynamic, IndexFormat format)
 {
     return(new D3DIndexBuffer(_device, sizeInBytes, isDynamic, D3DFormats.ConvertIndexFormat(format)));
 }
Exemplo n.º 3
0
 public void SetIndices(IntPtr indices, IndexFormat format, int elementSizeInBytes, int count, int elementOffset)
 {
     SetData(indices, elementSizeInBytes * count, elementSizeInBytes * elementOffset);
     _format = D3DFormats.ConvertIndexFormat(format);
 }