I have a little program that render a yellow triangle twice, once on the left half of a framebuffer and once on the right side.
Dump of the texture
Now, after that I render the content of this framebuffer on the screen.
It works if I use GL_TEXTURE_RECTANGLE in the framebuffer constructor:
https://github.com/elect86/Joglus/blob/master/Joglolus/src/joglus/example1/FrameBuffer.java
In binding the texture, function renderFullScreenQuad, line 372:
https://github.com/elect86/Joglus/blob/master/Joglolus/src/joglus/example1/GlViewer.java
And using sampler2DRect in the fragment shader:
#version 330
out vec4 outputColor;
uniform sampler2DRect texture0;
void main() {
outputColor = texture(texture0, gl_FragCoord.xy);
}
But if I change all the RECTANGLE to 2D and I use sample2D in the fs, I get a total black image at the end of the display(), although the dump of the texture shows always the correct image... I would like to know why.