Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
            /// <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
            }
Exemplo n.º 3
0
 /// <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)
 {
 }