void GLES2FBOManager::bind(RenderTarget *target)
    {
        /// Check if the render target is in the rendertarget->FBO map
        GLES2FrameBufferObject *fbo = 0;
        target->getCustomAttribute("FBO", &fbo);
        if(fbo)
            fbo->bind();
        else
            // Old style context (window/pbuffer) or copying render texture
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
            // The screen buffer is 1 on iOS
            glBindFramebuffer(GL_FRAMEBUFFER, 1);
#else
            glBindFramebuffer(GL_FRAMEBUFFER, 0);
#endif
        GL_CHECK_ERROR;
    }
예제 #2
0
    void GLES2FBOManager::bind(RenderTarget *target)
    {
        // Check if the render target is in the rendertarget->FBO map
        GLES2FrameBufferObject *fbo = 0;
        target->getCustomAttribute("FBO", &fbo);
        if(fbo)
            fbo->bind();
            // Old style context (window/pbuffer) or copying render texture
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
        else
        {
            // Non-multisampled screen buffer is FBO #1 on iOS, multisampled is yet another,
            // so give the target ability to influence decision which FBO to use
            GLuint glfbo = 0;
            target->getCustomAttribute("GLFBO", &glfbo);
            OGRE_CHECK_GL_ERROR(glBindFramebuffer(GL_FRAMEBUFFER, glfbo));
        }
#else
        else