Frame Buffer Object abstraction.
Inheritance: IDisposable
		public GLESFBORenderTexture( GLESFBORTTManager manager, string name, GLESSurfaceDescription target, bool writeGamma, int fsaa )
			: base( name, target, writeGamma, fsaa )
		{
			this._fbo = new GLESFrameBufferObject( manager, fsaa );
			GLESConfig.GlCheckError( this );

			Width = _fbo.Width;
			Height = _fbo.Height;
		}
Beispiel #2
0
        /// <summary>
        ///   Bind a certain render target if it is a FBO. If it is not a FBO, bind the main frame buffer.
        /// </summary>
        /// <param name="target"> </param>
        public override void Bind(Graphics.RenderTarget target)
        {
            /// Check if the render target is in the rendertarget->FBO map
            GLESFrameBufferObject fbo = null;

            fbo = target["FBO"] as GLESFrameBufferObject;
            if (fbo != null)
            {
                fbo.Bind();
            }
            else
            {
                // Old style context (window/pbuffer) or copying render texture
#if AXIOM_PLATFORM_IPHONE
                // The screen buffer is 1 on iPhone
                OpenGLOES.BindFramebuffer(All.FramebufferOes, 1);
#else
                OpenGLOES.BindFramebuffer(All.FramebufferOes, 0);
#endif
                GLESConfig.GlCheckError(this);
            }
        }
		/// <summary>
		/// </summary>
		/// <param name="manager"> </param>
		/// <param name="name"> </param>
		public GLESFBOMultiRenderTarget( GLESFBORTTManager manager, string name )
			: base( name )
		{
			this._fbo = new GLESFrameBufferObject( manager, 0 );
		}
 /// <summary>
 /// </summary>
 /// <param name="manager"> </param>
 /// <param name="name"> </param>
 public GLESFBOMultiRenderTarget(GLESFBORTTManager manager, string name)
     : base(name)
 {
     this._fbo = new GLESFrameBufferObject(manager, 0);
 }