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

[Public WebGL] Issues with Animating textures in WebGL example on MDC


I hope this is the right place to ask this.

I've been playing with the example on MDC that should show a rotating
cube with a video as textures. Example can be found here:
https://developer.mozilla.org/en/WebGL/Animating_textures_in_WebGL The
example is currently out of date and I updated it as much as I could,
my current version can be found here:

I changed all the references to WebGL*Array to their corresponding
typed array and added the precision stuff to the shader. I also had to
change line 60 because the "canplaythrough" event didn't seem to

Currently I'm stuck on line 287 of the webgl-demo.js file:

gl.texImage2D(gl.TEXTURE_2D, 0, videoElement, true);

This line throws TypeError in Chrome and n Mindfield I get:

uncaught exception: [Exception... "Not enough arguments"  nsresult:
"0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame ::
http://kassis.ca/webgl/video-sample/webgl-demo.js :: updateTexture ::
line 287"  data: no]

Line 0

Thank you

Nicolas Kassis
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: