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

Bind() public method

Bind FrameBufferObject
public Bind ( ) : void
return void
		public void Bind()
		{
			/// Bind it to FBO
			int fb = _multiSampleFB != 0 ? _multiSampleFB : _fb;
			OpenGLOES.BindFramebuffer( All.FramebufferOes, fb );
			GLESConfig.GlCheckError( this );
		}
		/// <summary>

Usage Example

Esempio n. 1
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);
            }
        }