I am not sure what I am doing wrong, but my texture out of the fbo is like 1/4 the size. To start with, just to get this working I was trying to just do the size 1:1 before I use the GL_LINEAR.
In the “newOpenGLContextCreated”, I am creating a new frame buffer, with:
juce::OpenGLContext* ownerContext = juce::OpenGLContext::getCurrentContext();
fb.initialise(*ownerContext, getWidth(), getHeight());
Later on in the render, to switch to this, I just do:
fb.makeCurrentRenderingTarget();
Then at the end of the render routine, I try doing this:
juce::gl::glBindFramebuffer(juce::gl::GL_READ_FRAMEBUFFER, fb.getFrameBufferID());
juce::gl::glBindFramebuffer(juce::gl::GL_DRAW_FRAMEBUFFER, 0);
juce::gl::glBlitFramebuffer(0,0,getWidth(),getHeight(),0,0,getWidth(),getHeight(),juce::gl::GL_COLOR_BUFFER_BIT,juce::gl::GL_LINEAR);
fb.releaseAsRenderingTarget();
And what I see is 1/4 of the original render in the bottom left of the screen. No amount of playing with glViewport fixes the problem.
Given everything is 1:1 right now, I just have no clue what I have done wrong. (I could see needing to adjust the glViewport once my FBO is twice the size or bigger for downsampling)
Anyone have any idea what I could be doing wrong here?
