Hello Folks,

I seem to be having an issue with making multiple calls to gl.drawElements while rendering to an offscreen framebuffer (as opposed to the screen itself).

From stepping through the code, it seems that every time I call gl.drawElements, the previous drawcall is erased and the new drawcall is all that is visible.

I know that I could group all of my objects so that they are passed in the same drawcall - which will probably be my workaround - but I wanted to know why gl.drawElements would exhibit this behaviour of clearing previous drawn objects while rendering to a framebuffer, but not when rendering to screen. As far as I can tell, nothing has changed betwee the draw calls that might account for this..


(Side question: - am I supposed even to be seeing -anything- when I'm rendering to an offscreen buffer? Why might the drawcall be rendering to the screen while stepping through the program with firebug when I've bound the offscreen framebuffer? I don't see any evidence of these frames when the program is running, and the framerate often dips below 10 FPS - so you'd think it would be obvious if they were actually drawing to the screen.)