PDA

View Full Version : Images generated in memory without using Canvas



zexx
09-10-2011, 08:59 AM
I need to generate images in memory and use them as textures (by calling glTexImage2D).

Is it possible to send a JavaScript array directly? I know this is normal in OpenGL, but WebGL seems to only accept image objects.

Canvas can be used to create image objects, but that seems like a pretty slow solution. Since I will already have all the pixels in the array, do I really need the Canvas object as a mediator?