PDA

View Full Version : Drawing WebGL back to 2D Canvas



Phinehas
02-17-2011, 09:40 PM
Hi,

I can draw some textures (use 2D canvas) in WebGL. However, I encounter another problem. If I want to rotate the object in WebGL and then draw the current view (after rotation) in 2D canvas, how can I implement it well? Is is possible for me to pass the WebGL object or just the view of WebGL object to 2D canvas?

Thanks for your help.

wglb
02-25-2011, 02:15 AM
Maybe you could use webgl_canvas.toDataUrl("image/png") method to get "screenshot" of the webgl canvas and then use it within canvas2d