Alternative to RenderTexture


There is an API in the Starling framework called RenderTexture which allows you to draw any display objects onto a render texture using the GPU. The method is convenient and fast, and I would like to know if there is or will be anything in OpenFL that can do the same.
DrawTiles uses the graphics property of the sprite which cannot be manipulated like a bitmapdata or texture. And the bitmapData.draw() method currently uses a software renderer which is slow in real-time.

Thanks a lot.

In OpenFL “next” bitmapData.draw will use hardware rendering, until then I’m not certain there’s a replacement for it, barring a tricky double-OpenGLView type approach, to force rendering to go to a different framebuffer (I’ve seen this for some full-screen shader effects) :slight_smile:

1 Like

I was looking for the hardware bitmapData as well. This feature is going to open up a whole lot of possibilities for me :smiley: Is there an estimated time when this feature will become available?

Also some extra questions regarding the new bitmapData class. Is there an alternative to drawBundled that behaves similarly to drawTiles that batches the sprites? Will filters on sprites be drawn onto the bitmapData as well?

Currently BitmapData will be done in software (copy, read pixels, etc) but the “draw” command should pass through GL or display list operations, such as custom shader support or auto-batching of display objects is all done in the GPU, obviously.

Sounds fantastic! Is there an estimated time when this feature will become available? And will the shader system be integrated into the current filter system and be customizable?