コード例 #1
0
        /// <summary>
        /// Swaps the buffers.
        /// </summary>
        public void SwapBuffers()
        {
            var temp = ActiveFBO;

            ActiveFBO   = InactiveFBO;
            InactiveFBO = ActiveFBO;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderSurfaceGL"/> class.
 /// </summary>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="hasDepthBuffer">if set to <c>true</c> [has depth buffer].</param>
 /// <param name="components">The components.</param>
 /// <param name="floatingPoint">if set to <c>true</c> [floating point].</param>
 public RenderSurfaceGL(int width, int height, bool hasDepthBuffer = false, byte components = 4, bool floatingPoint = false) : this(hasDepthBuffer)
 {
     var tex = Texture2dGL.Create(width, height, components, floatingPoint);
     if (hasDepthBuffer)
     {
         fbo = new FBOwithDepth(tex);
     }
     else
     {
         fbo = new FBO(tex);
     }
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DoubleBufferedFBO"/> class.
 /// </summary>
 /// <param name="creator">The creator.</param>
 public DoubleBufferedFBO(Func <ITexture2D> creator)
 {
     ActiveFBO   = new FBO(creator());
     InactiveFBO = new FBO(creator());
 }