/// <summary> /// Construct a EmptyTechnique. /// </summary> /// <param name="texture"> /// The <see cref="Texture3d"/> affected by this Technique. /// </param> /// <param name="target"> /// A <see cref="TextureTarget"/> that specify the texture target. /// </param> /// <param name="pixelFormat"> /// The texture pixel format. /// </param> /// <param name="images"> /// The image set of the texture. /// </param> public ImageTechnique(Texture3d texture, TextureTarget target, PixelLayout pixelFormat, Image[] images) : base(texture) { if (images == null) { throw new ArgumentNullException("images"); } if (images.Length == 0) { throw new ArgumentException("no images", "images"); } if (!Array.TrueForAll(images, delegate(Image item) { return(item != null); })) { throw new ArgumentException("null item in image set", "images"); } if (!Array.TrueForAll(images, delegate(Image item) { return(item.Width == images[0].Width && item.Height == images[0].Height); })) { throw new ArgumentException("eterogeneous size in image set", "images"); } _Texture3d = texture; _Target = target; _PixelFormat = pixelFormat; _Images = images; Array.ForEach(_Images, delegate(Image image) { image.IncRef(); }); // Referenced }
/// <summary> /// Construct a EmptyTechnique. /// </summary> /// <param name="texture"> /// The <see cref="Texture3d"/> affected by this Technique. /// </param> /// <param name="target"> /// A <see cref="TextureTarget"/> that specify the texture target. /// </param> /// <param name="pixelFormat"> /// The texture pixel format. /// </param> /// <param name="width"> /// The width of the texture. /// </param> /// <param name="height"> /// The height of the texture. /// </param> /// <param name="depth"> /// The depth of the texture. /// </param> public EmptyTechnique(Texture3d texture, TextureTarget target, uint level, PixelLayout pixelFormat, uint width, uint height, uint depth) : base(texture) { _Texture3d = texture; _Target = target; _Level = level; _PixelFormat = pixelFormat; _Width = width; _Height = height; _Depth = depth; }