Hi everyone,
I am currently trying to develop a 3d game using raw webgl through brython. Having used with pyopengl before, I quickly followed along with
this tutorial to familiarize myself with webgl-specific details. In order to store the vertices of the triangle in the tutorial, typed arrays (such as Float32Array) are required to pass data to webgl, as regular arrays throw the following error in brython:
Error: WebGL: drawArrays: bound vertex attribute buffers do not have sufficient size for given first and countHowever, Float32Arrays cannot be directly created in brython with a simple Float32Array([vertex data goes here]) constructor call. Is there any way that these data types can be included in brython as builtin object types? Currently, I have a workaround using brython's JSConstructor, but it is unwieldly to use and requires ugly javascript snippets. A live demo using this hack to display a triangle can be found
here. Any help to resolve this issue and simplify this code would be appreciated.
Thanks,
Anish