evanw / glfx.js

An image effects library for JavaScript using WebGL
https://evanw.github.io/glfx.js/
MIT License
3.26k stars 402 forks source link

assign gl to canvas.gl attribute for native parameter access #30

Closed jywarren closed 8 years ago

jywarren commented 8 years ago

To run things like gl.getParameter(gl.MAX_RENDERBUFFER_SIZE);, I need access to the gl variable, but that's stuck in a local context. Can we append it to the canvas object so it can be accessed from outside when needed?

jywarren commented 8 years ago

Ah! I see - it's in canvas._.gl -- thanks, closing!