Code here: http://sprunge.us/aGii
expected behaviour: texture attached to fbo is filled with red, red square then renders in bottom left 50x50 pixel square. rest of screen remains black
actual behavior: white square renders in bottom left 50x50 pixel square, rest of screen is red.
At the moment I’m just trying to get the frame buffer to render anything, although my eventual goal is to render some triangles into it.
Any help would be appreciated
an update: http://sprunge.us/NJCA
the colors from the two FBOs seem to be being combined, but the wrong way around. I’d expect the red square to be at the bottom left, and the green square to be the rest of the screen. However, it’s the opposite way around.
some changes for you
- you must set the clear colour before you clear
- you must activate a texture before you bind