OpenGL Shader Problem

Thanks. I’m aware that I can do the same thing a whole lot easier in Processing. See my other thread which @Scudly helped me with:
https://discourse.processing.org/t/inline-shader-code-will-not-run/40627
It’s no big deal if I never get the text book version to run, but it just bugs me when code won’t work as expected and I thought maybe someone else could get it to work. So far you’re the only one to respond. I was amazed that it even ran in Processing, even though it didn’t work as expected; it failed to run at all in other editors due to dependencies I could never fix. I’m just glad that I’m not sitting in the lecture hall.

Mac doesn’t like gl_FragColor, but “out vec4 outColor” substitution fixes it as pointed out to me in another thread. Interesting to see your version of inline code which is different from what is in the book (no line breaks) and not quite the same technique used by @Scudly. I appreciate all the help; it’s not an easy topic, but Processing has simplified it a lot.

Impressive that the screenshot is a running app; didn’t know that was possible.