sinisterchipmunk/jax — Issue #28: Jax.Texture#renderTo
Author: sinisterchipmunk
Created: 2011-11-08 14:25:17+00:00
State: open

Jax.Texture#renderTo(callback) -> any
- callback (Function): a function to be called after the texture has been bound as a render target

A wrapper around `Jax.Framebuffer` to make it easier to render to texture. Before the callback is fired, the framebuffer should be bound and its viewport defined; after the callback returns, the framebuffer should be unbound and the viewport restored to its previous setting. The return value from the callback should be returned from the `#renderTo` method.