I am trying to copy the contents of one canvas to another.
The source canvas has a webgl context.
The destination canvas has a 2d context.
My code looks like:
destinationContext.drawImage(sourceCanvas, 0, 0);
This works in Firefox and IE, but it does not work in Chrome. Why not?
Thanks!
Here's some working code.
Here's some working code with a delay. If you are not copying the WebGL canvas in the same event that you drew to it then you need one of these solutions. Even though that question is about
toDataURL
all the same things apply to using a WebGL canvas withdrawImage
.