Exemplo n.º 1
0
 public static void copy_region(Framebuffer source, ivec4 src_region, Framebuffer destination, ivec4 dst_region, ClearBufferMask mask, Filter filter) => copy_region(source, src_region.x, src_region.y, src_region.z, src_region.w, destination, dst_region.x, dst_region.y, dst_region.z, dst_region.w, mask, filter);
Exemplo n.º 2
0
        //public static void bind_default() => GL.BindFramebuffer(FramebufferTarget.Framebuffer, NullHandle);

        /// <summary>
        /// Copies a region of one framebuffer to another
        /// </summary>
        /// <param name="source">The buffer to be copied from</param>
        /// <param name="src0x">The x coord of the first point in the source buffer</param>
        /// <param name="src0y">The y coord of the first point in the source buffer</param>
        /// <param name="src1x">The x coord of the second point in the source buffer</param>
        /// <param name="src1y">The y coord of the second point in the source buffer</param>
        /// <param name="destination">The buffer to copy to</param>
        /// <param name="dst0x">The x coord of the first point in the destination buffer</param>
        /// <param name="dst0y">The y coord of the first point in the destination buffer</param>
        /// <param name="dst1x">The x coord of the second point in the destination buffer</param>
        /// <param name="dst1y">The y coord of the second point in the destination buffer</param>
        /// <param name="mask">The bitwise OR of the flags indicating wich buffers are to be copied</param>
        /// <param name="filter">Specifies the interpolation to be applied if the image is stretched</param>
        public static void copy_region(Framebuffer source, int src0x, int src0y, int src1x, int src1y, Framebuffer destination, int dst0x, int dst0y, int dst1x, int dst1y, ClearBufferMask mask, Filter filter)
        {
            GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, source.gl_handle);
            GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, destination.gl_handle);

            GL.BlitFramebuffer(src0x, src0y, src1x, src1y, dst0x, dst0y, dst1x, dst1y, mask, (BlitFramebufferFilter)filter);
        }
Exemplo n.º 3
0
 public static void copy_region(Framebuffer source, ivec2 src0, ivec2 src1, Framebuffer destination, ivec2 dst0, ivec2 dst1, ClearBufferMask mask, Filter filter) => copy_region(source, src0.x, src0.y, src1.x, src1.y, destination, dst0.x, dst0.y, dst1.x, dst1.y, mask, filter);