Exemple #1
0
            /// <summary>
            /// Construct a ImageTechnique.
            /// </summary>
            /// <param name="texture">
            /// The <see cref="TextureArray2d"/> affected by this Technique.
            /// </param>
            /// <param name="target">
            /// A <see cref="TextureTarget"/> that specifies the texture target.
            /// </param>
            /// <param name="pixelFormat">
            /// The <see cref="PixelLayout"/> that specifies texture pixel format.
            /// </param>
            /// <param name="images">
            /// A <see cref="Image"/> that specifies the texture array image for the specified layer.
            /// </param>
            public ImageTechnique(TextureArray2d texture, TextureTarget target, PixelLayout pixelFormat, Image image, uint layer) :
                base(texture)
            {
                if (image == null)
                {
                    throw new ArgumentNullException("images");
                }

                _TextureArray2d = texture;
                _Target         = target;
                _PixelFormat    = pixelFormat;
                _Image          = image;
                _Image.IncRef();
                _ImageLayer = layer;
            }
Exemple #2
0
            /// <summary>
            /// Construct a EmptyTechnique.
            /// </summary>
            /// <param name="texture">
            /// The <see cref="Texture2D"/> affected by this Technique.
            /// </param>
            /// <param name="target">
            /// A <see cref="TextureTarget"/> that specify the texture target.
            /// </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"/> holding the texture data.
            /// </param>
            public ImageTechnique(Texture2D texture, TextureTarget target, uint level, PixelLayout pixelFormat, Image image) :
                base(texture)
            {
                if (image == null)
                {
                    throw new ArgumentNullException("image");
                }

                _Texture2d   = texture;
                _Target      = target;
                _Level       = level;
                _PixelFormat = pixelFormat;
                _Image       = image;
                _Image.IncRef();                                // Referenced
            }
Exemple #3
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
            }