I was wondering if there was any other way to get textures in WebGL other than the standard Image() constructor.
Specifically I would like to make a texture using the data from a tag in html, but I would also like to see other ways.
You can't get data from HTML tags in general. Only HTMLCanvasElement
, HTMLImageElement
, and HTMLVideoElement
.
Otherwise you can also use ImageData
and you can provide your data in TypedArray
s
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.