Programming tutorials & 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.
Explore the tutorials
OpenGL 2.x
The classic pipeline
Windows, cameras, lighting and textures with fixed-function OpenGL.
OpenGL 4.x
Shaders & buffers
Create a window, load shaders and draw with VAOs, VBOs and matrices.
GLSL
Write your own shaders
Learn how vertex and fragment shaders change what appears on screen.
Terrain
Build a landscape
Heightmaps, terrain generation and rendering with legacy OpenGL.
Maths
Behind the graphics
The supporting maths, from transformations to useful graphics concepts.
PhysX
A little physics
Set up scenes, collisions and materials with AGEIA PhysX 2.7.
WebGL
Graphics in the browser
A small introduction to bringing OpenGL-style rendering to the web.
Other tutorials
A few more things
Extra programming and graphics tutorials from around the site.
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 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.