Shaders to work on ZIM Objects

We tried to make ZIM Shader() work on Display Objects - and now we have figured out what we did wrong. We were adding the Display Object in the before parameter... but that only runs once. It needs to constantly run:

gl.bindTexture(gl.TEXTURE_2D, texture);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);

So... should be able to adjust this for ZIM 019.

2 Likes