On 02/13/2014 05:46 AM, bgroenks96 [via jogamp] wrote:
> This is probably more of a general OpenGL question than just JOGL, but I'm
> trying to figure out how to get my shaders to render to the currently bound FBO?
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());
}
Look at our unit test demo code: FBOMix2DemosES2.
~Sven