Why is Context3D::clear() imperative before drawTriangles() ?
Hi,
I would like to do an accumulation effect, using Stage3D, by drawing into the backbuffer without clearing it, first ( to do trails, etc. ). This type of accumulation effect, where the previous, uncleared, backbuffer serves as the destination for the next render call, is frequently seen in music visualizers for instance.
With Molehill, apparently, it is is impossible to call drawTriangles() wihout doing a clear(), first. You actually get an error ( not a warning ), if you try to do so. You get this error regardless if you are rendering to the back buffer or to a texture buffer ( via setRenderToTexture() ).
The only way I can think of for doing this accumulation effect is to do a Context3D::drawToBitmapData(). Unfortunately, according to the AS3 doc, we are warned that drawToBitmapData() is slow, and can take up to a second!
Any ideas?
Also to the Molehill team: do we really need to clear() every time before drawTriangles() ?