[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] using the same context with multiple canvases
This is just my opinion, but it feels more natural to flip the bindings so that the canvas is being set as a target for the context, like so:
gl = canvas1.getContext("webgl");
gl.clearColor(0, 1, 0, 1);
By representing the canvas as a property of the context, I feel it better implies the fact that the context can only draw to a single canvas at a time. But like I said, just my opinion.
I'm a big fan of this idea overall! It will certainly make life easier for developers that are trying to do anything resembling the traditional 4-view modeling tools, but there's some fun opportunities for other more creative uses too!