Open MrTP opened 4 years ago
I'm getting WASM: Microsoft.JSInterop.JSException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': parameter 9 is not of type 'ArrayBufferView'.
Now from using your branch, even though I'm using byte[] in parameter 9. Tried float[] but it gives me a webgl error instead.
Using an int[] instead of byte and changing line 94 of CanvasContextManager.ts to returning an Uint8Array solved it. But using an int takes up memory. Trying to make the typescript file output an ArrayBufferView but haven't succeded yet.
could someone please merge this already?
2ndwolf : In my case, I was using a byte[] for the data, which was passed as a string to CompanyContextManager.ts deserialize. I added else if (typeof (object) === "string" && (method === "bufferData" || method === "bufferSubData" || method === "texImage2D")) { and that got past that issue, still working thru other rendering setup.
I'm experiencing the same issue as @2ndwolf. I would also really like this missing parameter issue sorted, but I think more work is needed than what's in this PR.
Fixes Issue https://github.com/BlazorExtensions/Canvas/issues/50 The current implementation of texImage2D throws an exception on call because its missing the "border" parameter. Since border is specified to always be 0 it could be set by default but I did not want to deviate from the parameter count used in standard WebGL.