/// <summary> /// Initializes a new instance of the <see cref = "T:SharpDX.Direct3D10.Texture1D" /> class. /// </summary> /// <param name = "device">The device with which to associate the texture.</param> /// <param name = "description">The description of the texture.</param> /// <param name = "data">An array of initial texture data for each subresource.</param> public Texture1D(Device device, Texture1DDescription description, DataStream[] data) : base(IntPtr.Zero) { var subResourceDatas = new DataBox[data.Length]; for (int i = 0; i < subResourceDatas.Length; i++) { subResourceDatas[i].DataPointer = data[i].DataPointer; } device.CreateTexture1D(ref description, subResourceDatas, this); }
/// <summary> /// Initializes a new instance of the <see cref = "T:SharpDX.Direct3D10.Texture1D" /> class. /// </summary> /// <param name = "device">The device with which to associate the texture.</param> /// <param name = "description">The description of the texture.</param> /// <param name = "data">An array of initial texture data for each subresource.</param> public Texture1D(Device device, Texture1DDescription description, DataStream[] data) : base(IntPtr.Zero) { System.Diagnostics.Debug.Assert(data != null); var subResourceDatas = new DataBox[data.Length]; for (int i = 0; i < subResourceDatas.Length; i++) { subResourceDatas[i].DataPointer = data[i].DataPointer; } device.CreateTexture1D(ref description, subResourceDatas, this); }
/// <summary> /// Initializes a new instance of the <see cref = "T:SharpDX.Direct3D10.Texture1D" /> class. /// </summary> /// <param name = "device">The device with which to associate the texture.</param> /// <param name = "description">The description of the texture.</param> public Texture1D(Device device, Texture1DDescription description) : base(IntPtr.Zero) { device.CreateTexture1D(ref description, null, this); }