示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GorgonTexture1D"/> class.
 /// </summary>
 /// <param name="graphics">The graphics interface that owns this texture.</param>
 /// <param name="name">The name of the texture.</param>
 /// <param name="settings">Settings to pass to the texture.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="name"/> parameter is NULL (Nothing in VB.Net).</exception>
 ///
 /// <exception cref="System.ArgumentException">Thrown when the <paramref name="name"/> parameter is an empty string.</exception>
 internal GorgonTexture1D(GorgonGraphics graphics, string name, ITextureSettings settings)
     : base(graphics, name, settings)
 {
     Settings = new GorgonTexture1DSettings
     {
         Width = settings.Width,
         AllowUnorderedAccessViews = settings.AllowUnorderedAccessViews,
         ArrayCount       = settings.ArrayCount,
         Format           = settings.Format,
         MipCount         = settings.MipCount,
         ShaderViewFormat = settings.ShaderViewFormat,
         Usage            = settings.Usage
     };
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GorgonTexture2D"/> class.
 /// </summary>
 /// <param name="graphics">The graphics interface that owns this texture.</param>
 /// <param name="name">The name of the texture.</param>
 /// <param name="settings">Settings to pass to the texture.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="name"/> parameter is NULL (Nothing in VB.Net).</exception>
 /// <exception cref="System.ArgumentException">Thrown when the <paramref name="name"/> parameter is an empty string.</exception>
 internal GorgonTexture2D(GorgonGraphics graphics, string name, ITextureSettings settings)
     : base(graphics, name, settings)
 {
     Settings = new GorgonTexture2DSettings
     {
         Width  = settings.Width,
         Height = settings.Height,
         AllowUnorderedAccessViews = settings.AllowUnorderedAccessViews,
         ArrayCount       = settings.ArrayCount,
         Format           = settings.Format,
         IsTextureCube    = settings.IsTextureCube,
         MipCount         = settings.MipCount,
         Multisampling    = settings.Multisampling,
         ShaderViewFormat = settings.ShaderViewFormat,
         Usage            = settings.Usage
     };
 }