Upgrading Our Way Through OpenGL 1.x

https://news.ycombinator.com/rss Hits: 4
Summary

Back in 2020, I started taking a look at DirectX 9. That was interesting to me because it was the final form of the old “fixed function” graphics pipeline—DX10 was a major rupture in the API, making GPU shaders the fundamental unit of graphics work and discarding much of the older workflows. This turned into two projects: a pixel-based library that allowed C programs to write like a DOS program that owned the whole screen, and an accelerated sprite-like library that could do color and alpha blending in sensible ways. At the time, I observed that “the approach to getting the display out is completely different from how I did it with OpenGL under GTK3, and even noticeably different from the way you’d have done it with OpenGL back in 2002 when DirectX 9 was first released.” I never did, however, actually go look at what it would take to do it with OpenGL, in 2002 or otherwise. In the meantime, I’ve discovered that the Khronos Group publishes a History of OpenGL including all previous versions. I’ve kind of been meaning to revisit those old simple-graphics systems for awhile, and this will make a fine excuse. In fact, we can do a little better. We can actually start at the very beginning, writing a skeletal version of the pixel-screen display that only uses the 1992 OpenGL 1.0 API, and then work our way up to the final 4.6 revision from 2017, picking up useful or newly-necessary capabilities as we go. 1992: OpenGL 1.0 The very first OpenGL spec was very minimal. Apparently, this was intentional—it was designed mostly to be a foundation based on a fraction of SGI’s IRIS GL, solid enough to extend but basic enough that third parties might actually implement it. In the event, they stripped out so much that almost everything we’d recognize as old-school 3D programming isn’t really there until 1.1. Nevertheless, we have enough options here that we can ask for our sample display with only calls and options 1.0 supports. We’ll start here and build our way up. Our prep work, to...

First seen: 2025-10-23 17:32

Last seen: 2025-10-23 20:33