top of page
  • Writer's pictureLewis Marlow

Making FUN OpenGL Tutorials

Updated: Jul 16, 2020

I've spent the last few weeks trying to put together OpenGL tutorials for beginners in a way that's more fun and engaging than when I learned. It's a bit of a challenge.

Those of you who've done OpenGL tutorials before will know it's usually make a window, make a triangle, make a shader from a string and then from a file. Those last two are very cumbersome because of the layout of a string shader and then writing the code to read and compile a shader.

The thing is, they're good tutorials but it's very limited on where you can go from each one. The only thing you can do is move onto the next really and it quickly becomes more hard work and memorising than actual learning.

With the triangle for example, you could go on to make a square and even a cube. Those of you who know graphics will know that when you make a cube without a matrix for projection, it won't look like a cube. Not only that but the flat colour also makes it difficult to tell if it is a cube at all.

Anyways, I wanted to make tutorials in which the learner could engage with the material in a faster and more involved set of tutorials. I'm trying to make each tutorial less than 20 minutes and aiming for 15 which is apparently the prime amount of time for absorbing material. Any programmers out there will probably laugh at that. We've all been there bashing our heads against something until it worked, then not really known how it was solved because we tried sooo many solutions.

So the tutorials. This is the first part (after the setup video). It's nearly 20 minutes but I tried to keep it as detailed, short and punchy as possible and we end up with lots of possibility for animation and modification which, in my opinion, is more fun than making simple shapes.

You may have noticed the title card is Particle System. For a beginner, I feel like a particle system is the perfect opportunity to understand and get some proper experience with buffers, vertex attributes and uniforms. With the triangle, you layout the buffer data and forget about it really but with particle systems, you can add and change buffer data to get more interesting affects and just play about.

So this first video is to introduce the vertex attributes and how information is laid out in the buffers in the template project.

Now I'm stuck on the second part of this series. When I'm writing the scripts for these, I really want to put in as much information as I can. The script for the second part is 2800 words. In order to achieve 15 minutes, I'll need to talk at 3 or 4 words a second. It might be a bit much considering the terminology for buffers, arrays, vertex attributes, uniforms and all that jazz.

I just hope that they help those who want to get into graphics. It shouldn't be that you bash your head against it until it starts to make sense.

As soon as I'm finished with these though, I'll start something on Vulkan I think. Try a difference graphics API and then maybe Direct X. They're all supposed to be kind of similar but it'll be nice to know.

Lengthy one, thanks for reading. :)

If you do end up watching this video, please give me some feedback and criticism.

11 views0 comments

Recent Posts

See All

Finished University with a first class degree

Well that was hard work. I think the proof is that there hasn't been a blog post in a long time. I submitted my final piece of work on the 14th of June. 10 days after my Birthday and 1 day before my a


bottom of page