예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GorgonIndexBuffer" /> class, initialized with <see cref="int"/> values for 32 bit index buffers.
 /// </summary>
 /// <param name="graphics">The <see cref="GorgonGraphics"/> object used to create and manipulate the buffer.</param>
 /// <param name="info">Information used to create the buffer.</param>
 /// <param name="initialData">The initial data used to populate the buffer.</param>
 /// <exception cref="ArgumentNullException">Thrown when the <paramref name="graphics"/>, <paramref name="info"/> or the <paramref name="initialData"/> parameters are <b>null</b>.</exception>
 public GorgonIndexBuffer(GorgonGraphics graphics, IGorgonIndexBufferInfo info, GorgonNativeBuffer <int> initialData = null)
     : base(graphics)
 {
     _info = new GorgonIndexBufferInfo(info ?? throw new ArgumentNullException(nameof(info)));
     Initialize(initialData ?? throw new ArgumentNullException(nameof(initialData)));
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GorgonIndexBuffer" /> class.
 /// </summary>
 /// <param name="graphics">The <see cref="GorgonGraphics"/> object used to create and manipulate the buffer.</param>
 /// <param name="info">Information used to create the buffer.</param>
 /// <exception cref="ArgumentNullException">Thrown when the <paramref name="graphics"/>, or the <paramref name="info"/> parameters are <b>null</b>.</exception>
 public GorgonIndexBuffer(GorgonGraphics graphics, IGorgonIndexBufferInfo info)
     : base(graphics)
 {
     _info = new GorgonIndexBufferInfo(info ?? throw new ArgumentNullException(nameof(info)));
     Initialize <byte>(null);
 }