Ejemplo n.º 1
0
            /// <summary>
            /// Construct a ImageTechnique.
            /// </summary>
            /// <param name="texture">
            /// The <see cref="TextureCube"/> affected by this Technique.
            /// </param>
            /// <param name="pixelFormat">
            /// The texture pixel format.
            /// </param>
            /// <param name="images">
            /// The texture data.
            /// </param>
            public ImageTechnique(TextureCube texture, PixelLayout pixelFormat, Image[] images) :
                base(texture)
            {
                if (images == null)
                {
                    throw new ArgumentNullException("images");
                }
                if (images.Length != 6)
                {
                    throw new ArgumentException("images count mismatch", "images");
                }
                if (Array.TrueForAll(images, delegate(Image image) { return(image.Width == image.Height); }) == false)
                {
                    throw new ArgumentException("not square images", "images");
                }
                if (Array.TrueForAll(images, delegate(Image image) { return(image.Width == images[0].Width); }) == false)
                {
                    throw new ArgumentException("images size mismatch", "images");
                }

                _TextureCube = texture;
                _PixelFormat = pixelFormat;
                _Images      = new Image[6];
                Array.Copy(images, _Images, 6);
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Construct a EmptyTechnique.
 /// </summary>
 /// <param name="texture">
 /// The <see cref="TextureCube"/> affected by this Technique.
 /// </param>
 /// <param name="pixelFormat">
 /// The texture pixel format.
 /// </param>
 /// <param name="size">
 /// The size of the texture.
 /// </param>
 public EmptyTechnique(TextureCube texture, PixelLayout pixelFormat, uint size) :
     base(texture)
 {
     _TextureCube = texture;
     _PixelFormat = pixelFormat;
     _Size        = size;
 }
Ejemplo n.º 3
0
 public void AttachColor(uint attachmentIndex, TextureCube texture, TextureCube.CubeFace cubeFace, uint level)
 {
     AttachColor(attachmentIndex, new TextureCubeAttachment(texture, cubeFace, level));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Construct a TextureCubeAttachment specifing the texture.
 /// </summary>
 /// <param name="texture">
 /// The <see cref="TextureCube"/> to be attached to a Framebuffer.
 /// </param>
 /// <param name="cubeFace">
 /// The specific <see cref="TextureCube.CubeFace"/> to attach to a Framebuffer.
 /// </param>
 /// <param name="textureLevel">
 /// A <see cref="UInt32"/> that specify the level of <paramref name="texture"/> to be attached.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// Exception thrown if <paramref name="texture"/> is null.
 /// </exception>
 public TextureCubeAttachment(TextureCube texture, TextureCube.CubeFace cubeFace, uint textureLevel)
     : base(texture, textureLevel, TextureCube.GetTextureCubeTarget(cubeFace))
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Construct a TextureCubeAttachment specifing the texture.
 /// </summary>
 /// <param name="texture">
 /// The <see cref="TextureCube"/> to be attached to a Framebuffer.
 /// </param>
 /// <param name="cubeFace">
 /// The specific <see cref="TextureCube.CubeFace"/> to attach to a Framebuffer.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// Exception thrown if <paramref name="texture"/> is null.
 /// </exception>
 public TextureCubeAttachment(TextureCube texture, TextureCube.CubeFace cubeFace)
     : this(texture, cubeFace, 0)
 {
 }