pex-gl / pex-context

Modern WebGL state wrapper for PEX: allocate GPU resources (textures, buffers), setup state pipelines and passes, and combine them into commands.
http://pex-gl.github.io/pex-context/
MIT License
160 stars 12 forks source link

Add video as texture support #52

Closed simonharrisco closed 5 years ago

simonharrisco commented 5 years ago

Adds support of a video element as a texture, If you pass a in image element or a canvas element it should have a width/height property where as a video doesn't, so you can take the videoWidth/videoHeight in that situation.

As expected fails on non power of 2 video but errors correctly.