sinisterchipmunk/jax — Issue #51: Jax.Texture#getData
Author: sinisterchipmunk
Created: 2012-01-03 13:22:01+00:00
State: open

It would be nice to have a simple way to get raw texture data. Even though it's slow, there are cases when it would be helpful (example: for loading height maps).

Jax.Texture#getData should return null if the texture hasn't been loaded yet. It should return the data cached in memory if it has been previously retrieved. Otherwise, it should draw the texture to an internal Canvas2D, and then query the 2D context to return raw info.

Jax.Texture#dispose should clean up any data cached by Jax.Texture#getData.