-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-webgl
Description
I would like to pass a ImageBitmap
for the border_OR_canvas_OR_image_OR_pixels_OR_video
parameter of WebGLRenderingContext.texImage2D
. However, internaly texImage2D
checks for the type of the parameter and only allows ImageData
, ImageElement
, CanvasElement
or VideoElement
and throws an argument error otherwise.
For now I was able hack something together with dart:js that works, however it would be easier if I could just pass the parameter. I'm not sure if it's the easiest way to achieve it, but if anyone has a better idea, I would be happy about a response:
final glEx = new JsObject.fromBrowserObject(context);
glEx['o'].callMethod('texImage2D', [_textureTarget, 0, pixelFormat, pixelFormat, pixelDataType, new JsObject.fromBrowserObject(element)['o']]);
Metadata
Metadata
Assignees
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-webgl