Login  Register

Re: FBOs and Shaders

Posted by bgroenks96 on Feb 14, 2014; 4:37am
URL: https://forum.jogamp.org/FBOs-and-Shaders-tp4031557p4031581.html

Sven Gothel wrote
Simply by binding the FBO, i.e. FBObject.bind(GL gl):
    if(samples > 0 && fullFBOSupport) {
        // draw to multisampling - read from samplesSink
        gl.glBindFramebuffer(GL2ES3.GL_DRAW_FRAMEBUFFER, getWriteFramebuffer());
        gl.glBindFramebuffer(GL2ES3.GL_READ_FRAMEBUFFER, getReadFramebuffer());
    } else {
        // one for all
        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, getWriteFramebuffer());
    }
I have the FBO bound, and I do syncSamplingSink before drawing to screen.  It works if I draw via FFP, but when I draw using the shaders, the window remains black.  Do I need to set a particular sampler in the frag shader or something?