Programming tutorials, legacy graphics and newer development musings
Welcome to Swiftless Tutorials. Somehow this site has now been on the internet for the better part of 20 years, which is equal parts cool and mildly terrifying.
Swiftless started as a place for me to write down the programming and computer graphics things I was learning, usually because I had just spent far too long figuring something out and thought somebody else might appreciate not having to do the same thing. That part has not really changed.
What is here?
- OpenGL 2.x and terrain tutorials – classic fixed-function OpenGL, including the basics, cameras, lighting, textures, VBOs and terrain generation.
- GLSL and early modern OpenGL – shaders, VAOs, VBOs, matrices and the move away from the fixed-function pipeline.
- WebGL – a smaller introduction to getting OpenGL-style rendering running in the browser.
- Maths and PhysX – some of the supporting maths I found useful when learning graphics, plus the original AGEIA PhysX 2.7 tutorials preserved as historical material.
- The blog – newer development notes covering things I run into in the real world: .NET, Blazor, Azure, AI agents, automation, web development and whatever problem has annoyed me enough that I think it deserves a write-up.
Old code does not have to mean bad code
A lot of the graphics tutorials here are old. I do not want to pretend a tutorial originally written around 2008 was secretly written for 2026, because that removes a lot of the context that makes the site useful. Instead, I am working through the old material, fixing genuine bugs, cleaning up the source so it is copy/paste friendly, improving the explanations and clearly marking compatibility or historical information where it matters.
So yes, you will still find fixed-function OpenGL here. You will also find code that has been reviewed rather than simply abandoned. If you are maintaining something old, learning how the pipeline works underneath the newer APIs, or you are just curious about how we used to do things, there is still plenty worth learning from it.
What am I doing these days?
I am a Senior Software Developer in Adelaide, currently working at RDI Partners on AI agents, automation and web systems. My day-to-day work is a long way from the spinning OpenGL cubes that originally filled this site, but the thing I enjoy has stayed pretty consistent: understanding how something works, getting rid of unnecessary manual work and building software that makes somebody’s day easier.
Most of my recent development work has been around .NET, Blazor, Azure, SQL, APIs and web applications. In 2023 I also gave my first ever presentation at ADNUG (Adelaide .NET User Group), talking about moving an online retail platform to Blazor. I went way over time, naturally:
Legacy OpenGL in C#? Apparently, yes.
I have also been getting the original OpenGL tutorials running in .NET. There are wrappers for OpenGL, of course, but finding examples of the old fixed-function pipeline from C# was surprisingly painful. So after the usual amount of trial, error and wondering why I was doing this to myself, I put the working examples on GitHub:
Swiftless OpenGL Legacy C# examples on GitHub
Have a look around, break something, figure out why it broke, and hopefully learn something useful along the way.
Good luck coding!
Swiftless
Really liked your tutorials. For first time I could actually write running programs in minimum lines. Only you have a simple tutorial to create a window from scratch for OpenGL 4.0 with nice shader binding class. Everybody else keeps rotating between glut and glfw.
Could you do a tutorial describing the transformation / rotation / projection / etc, matricies in depth, as well is how the 4th element of a point is used and what it should be set to?
Swiftless says, “I have been delayed in writing up the version 2.0 tutorials, as you can see I started them in the regular OpenGL section of the site.”
What “regular OpenGL section”? I see a tab ‘OpenGL’, but when I pull down on it, I see only OpenGL 4 and WebGL. No “regular” section.
Hey Matt,
It wasn’t until I read this that I realized that some people might not notice the OpenGL tab as being a button in itself to go to the OpenGL 2 tutorials or as I called it, the “regular” section. This has since been separated a little more.
Thanks,
Swiftless
Hi,
You made great tutorials for Beginner to Advanced programmers π
Btw, do you have a plan to add tutorials for OpenGL ES 2.0 or newer? because it doesn’t have fixed pipeline anymore and everything need to be done using shaders, so it’s probably too difficult for beginners to learn by them self (even a simple program to render one triangle)
Anyway, keep up the good works π
Sorry, i mean OpenGL ES for Windows, since there are a few middleware libraries that translate OpenGL ES to native OpenGL/Direct3D, and due to portability many programs are starting to use OpenGL ES for desktop and mobile platform.
i am drawing two cubes(solid) ,first the bigger one and then the smaller one inside but the smaller one is always visible though it is inside,i am not able to understand how to make a view in which it is not visible
Wellcome back!
Nice design btw. π
[Basic Question] I want to create pool, can you show the simple code to show the water animation or whatever to show the water, please. Thanks b4
I want to create pool how can you show the simple code to show the water animation or whatever to show the water, please. Thanks b4
Looks slick, thanks for the update, and looking forward to your future updates!
Also I’d like to request an extended tutorial to openGL texture coordinate generation where you explain what these really are:
GL_TEXTURE_GEN_S
GL_TEXTURE_GEN_R
GL_TEXTURE_GEN_T
GL_TEXTURE_GEN_Q
and do the texture coordinate generation in the GLSL shader instead. If you can do that I’d appreicate it since its my understanding that openGL 3 does not support texture generation thru fixed pipeline anymore or does it? In that case it needs to be done in the shader. I’d appreciate if you explained more about this in tutorial or even responding here would be fine! π
your previous theme was much better, I’m gonna miss it π
Great source, thanks!
Great Work… really great work. i take lot of help from your tutorials. i start openGl just a week ago.. and your tutorials totally help me in building basics of openGl.by help Of God i will go further in OpenGl..But In this field i remember your tutorials. May god help you .Great Work keep it up.