Intro to WebGL

3/19/2023

Oh WebGL, I can tell I'm going to hate you already...

This weeks assignment was to create the 'Hello world' of WebGl, a floating triangle. All jokes aside, it went fairly well overall, especially since we were given a pretty good template that we could work within in order to get used to WebGL. One of the weirdest things for me, and something that made this assignment quite difficult, was the sort of black box nature of WebGL. I could pass things into it and see what came out the other side but I was just hoping that it was doing all of the right things inside. This did actually cause some issues when I was trying to render to line grid. I had actually forgotten to pass in the color data to the shader program but WebGL wasn't throwing any errors and from my side it really looked like I was doing things pretty correctly. One of the main ways I work to solve issues is by looking for errors or noticing problems using the debugger, but I wasn't able to do that as effectively in this assignment. This might be just because I don't have enough experience with the format yet but it took a lot of searching and a couple days to find that issue I had with the color and it seemed like something there was no way to easily discover.

As I mentioned though, all in all the project went fairly well. I definitely need more practice in WebGL, but I do have a better understand of how it works, and I have a better grasp on the state machine nature of the whole thing. It's going to take a while to get used to programming what feels like these totally separate things and then trusting the API to put them together correctly, but I can see myself becoming more comfortable with this the longer I spent with it.

I found the WebGl programming guide particularly helpful for this assignment. While I didn't go through and do the exercises they suggest in it, it did help provide a little more context on what certain methods over just looking at the straight documentation. The documentation was another good resource though, and I definitely want to spend more time exploring it. I have a bit of a thing for looking through documentation and seeing all the cool stuff you can do and then never doing anything with that knowledge so maybe I should do it with something I'm actively using for once :p.

Group work went a little bit better this week than last week but it wasn't great. Although that was more because neither of us had the best understanding of what was going on and not so much for lack of trying. I really wanted to attend office hours for the issues I was having with the lines, but unfortunately I encountered the problem after office hours in the evening on the Friday and had already solved it by the time the Monday office hours rolled around. Also I'm stubborn.

I thiiiink I might have messed up the coordinates
I stopped the rotation so you can see the color effect a little better

I had a pretty fun time messing around with the effect on the colors. I wanted to do something a little bit more extravagant but I had to move on to other assignments so I couldn't spend too much time on it. It took me a good while to figure out how to even create a new vector that I could add to the existing colors so just getting something were I could individually effect each color took a good while.

The final result