Axiom.RenderSystems.OpenGLES.GLESFBOManager.Bind C# (CSharp) Method

Bind() public method

Bind a certain render target if it is a FBO. If it is not a FBO, bind the main frame buffer.
public Bind ( Graphics target ) : void
target Graphics
return void
		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);
            }
		}