Render sprites to texture for GL targets

I added bitmapData.readable, which currently can be set to false to enable support for a GL framebuffer instead of using traditional memory. I don’t know that I feel completely happy with this, I think that bitmapData.readable may be better as a getter (similar to transparent)

In my taste readable is confusing naming, because it you don’t know that this is related to GL renderer, you can’t guess it by its name.

What about layerType for getter name? It should be enum with values FRAMEBUFFER and SOFTWARE.

and some other method (perhaps) should change the behavior

At my point, there is no need to change layer type at runtime, so it can be set during BitmapData creation.

Also it should be no-ops for non-GL targets.

1 Like