Learning WebGL with Elm!

Hello! I’ve started learning Elm a few days ago and I’m wanting to use it with WebGL but I’m not really sure how to use WebGL. I’ve looked at a few examples and have been looking through them and slowly learning but does anyone have any other resources they could suggest me?

Hi @SabeDoesThings,

I guess you’ve already read through the webgl 1.1.3 package documentation and checked the examples. The main thing to understand is the rendering pipeline: how vertex and fragment shader relate to each other, what are attributes, uniforms and varyings. Elm ensures that the types of these fit together. You can additionally check https://webglfundamentals.org that also explains these concepts but in JavaScript.

Having understood this, you can work through some basic lessons. The Lessons – Learning WebGL comes to my mind. Nacho Martín did this in Elm GitHub - nacmartin/elm-webgl-lessons: A series of lessons in elm-webgl

If the goal is to not learn WebGL, but rather to render 3D on the screen, then you can use a higher level rendering package elm-3d-scene 1.0.2

To get a sense of what’s possible you can check this collection of examples 3D Graphics in the Browser with Elm - DEV Community that @lucamug put together

6 Likes

Hello @unsoundscapes,

Thank you so much for the advise! I’m really wanting to do game dev in elm and this will help me out a lot! I recognize your profile picture of the Mogee so I think it’s awesome that you replied so you have experience with game dev in Elm and WebGL lol.

But again thank you this helps a lot.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.