/// <summary> /// Construct a EmptyTechnique. /// </summary> /// <param name="texture"> /// The <see cref="Texture1D"/> affected by this Technique. /// </param> /// <param name="level"> /// The specific level of the target to define. Defaults to zero. /// </param> /// <param name="pixelFormat"> /// The texture pixel format. /// </param> /// <param name="width"> /// The width of the texture. /// </param> public EmptyTechnique(Texture1D texture, uint level, PixelLayout pixelFormat, uint width) : base(texture) { _Texture1d = texture; _Level = level; _PixelFormat = pixelFormat; _Width = width; }
/// <summary> /// Construct a ImageTechnique. /// </summary> /// <param name="texture"> /// The <see cref="Texture1D"/> affected by this Technique. /// </param> /// <param name="level"> /// The specific level of the target to define. Defaults to zero. /// </param> /// <param name="pixelFormat"> /// The texture pixel format. /// </param> /// <param name="image"> /// The <see cref="Image"/> that holds the texture data. /// </param> public ImageTechnique(Texture1D texture, uint level, PixelLayout pixelFormat, Image image) : base(texture) { if (image == null) { throw new ArgumentNullException("image"); } if (image.Height != 1) { throw new ArgumentException("height greater than 1", "image"); } _Texture1d = texture; _Level = level; _PixelFormat = pixelFormat; _Image = image; _Image.IncRef(); // Referenced }
/// <summary> /// Construct a ImageTechnique. /// </summary> /// <param name="texture"> /// The <see cref="Texture1D"/> affected by this Technique. /// </param> /// <param name="pixelFormat"> /// The texture pixel format. /// </param> /// <param name="image"> /// The <see cref="Image"/> that holds the texture data. /// </param> public ImageTechnique(Texture1D texture, PixelLayout pixelFormat, Image image) : this(texture, 0, pixelFormat, image) { }