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

Re: [Public WebGL] 2d canvas context to WebGL

A 2D canvas can be passed directly to WebGL texImage2D.

This happens to be slow in Firefox at the moment (the canvas is
currently read back and re-uploaded), but that could probably be fixed
if there is real-world pressure in that direction.


On 13-04-24 04:23 PM, Rik Cabanier wrote:
> All,
> Sorry if this is already documented but is there a way to efficiently
> use a 2d canvas context in WebGL?
> We've seen cases where people want to apply effects on 2d contexts and
> they're doing this by copying the 2d canvas to a buffer, running a
> shader on it and getting the result back.
> This is an expensive workflow both in time and memory. 
> Since the 2d canvas is already on the GPU (on most browsers), is there
> a way to directly access it from WebGL?
> Thanks!

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