Conrod: Any plans in adding support on Webassembly?

Created on 2 Jan 2018  路  4Comments  路  Source: PistonDevelopers/conrod

I am trying to pass the Vertex{pos,uv,color,mode} generated by conrod to javascript webgl2 using wasm. I am using the conrod::backend::glium's vertex and fragment sources. In webgl2, I am using gl.vertexAttribIPointer to add an array buffer of Uint32Array and specify the type to gl.UNSIGN_INT. In glsl I am trying write to "in uint mode;", assigning an array of multiple 1 (s), but it still matches with uint(0) in the glsl. Does anybody know how to resolve this?

Conrod --feature gfx_rs does compile in wasm32-unknown-unknown with the need of rand 0.3.18 and with a patch update. Not with glium. I think it is time for glium to start to support wasm since it claims to be able to support webgl. If not, I have to do some manual work myself.

Most helpful comment

there is a gui library that supports wasm. https://github.com/ryanisaacg/quicksilver
i think we can learn from it and port into conrod.

All 4 comments

Hey @alanpoon, thanks a lot for the issue! If the issue is currently within the glium crate itself, perhaps this issue might be better of under the glium repository? I'm happy to keep this open though to discuss the state of using conrod with WASM :+1:

@alanpoon did you end up creating the issue there? Could you post the link here?

Nope, I was thinking of writing a new backend for webgl. Stuck at this issue: https://github.com/oussama/webgl-rs/issues/2. I am having difficulties converting the general webgl tutorial's into webgl-rs. Glium is very under developed in webgl in my opinion.

there is a gui library that supports wasm. https://github.com/ryanisaacg/quicksilver
i think we can learn from it and port into conrod.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mitchmindtree picture mitchmindtree  路  5Comments

zengsai picture zengsai  路  10Comments

mitchmindtree picture mitchmindtree  路  4Comments

pedrohex picture pedrohex  路  7Comments

mitchmindtree picture mitchmindtree  路  3Comments