[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] using the same context with multiple canvases



On Sat, 17 Nov 2012, Rik Cabanier wrote:
>
> I think that the non-standard -webkit-canvas can do. See the example here:
> http://jsfiddle.net/hg3sq/4/
> The JS draws in the context once, but the same context is used multiple
> times and at different aspect ratios.
> 
> Using this feature, you can make an Illustrator/Photoshop-style navigator,
> or provide multiple views into the same context.

You could do that with regular canvas too, just draw the one canvas and 
paint it to each <canvas> you want to use it on. But the one you draw on 
(whether using -webkit-canvas in CSS or using <canvas>) has to be the 
biggest one, because in either case you're actually drawing a bitmap and 
not a vector.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------