sinisterchipmunk / jax

Framework for creating rich WebGL-enabled applications using JavaScript and Ruby
http://jaxgl.com
MIT License
96 stars 16 forks source link

Jax.Texture#renderTo #28

Closed sinisterchipmunk closed 12 years ago

sinisterchipmunk commented 12 years ago
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.

sinisterchipmunk commented 12 years ago

Implemented in bef04da6e67f11f7732f05f0bfc21e86ada495a5.