68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
OpenGL, Mesa and Glide work and lots of "useful" source code
Posted by: lauland1 on 2026-09-03 09:43:44
Hey all,

Because I've been working on SDL (1.2, 2 and 3) on classic Macs, I've been looking into OpenGL quite a bit lately.

I've produced some stuff that may be useful to others, or at the very least help people avoid reinventing the wheel, so to speak.

All of this works on ppc and m68k. Carbon (both on MacOS 9 and Mach-O X) is in progress.

All of these use the same style of Makefiles as my SDL ports, so "make -f Makefile.r68" for m68k and "make -f Makefile.r68ppc" for ppc.

NOTE: There are pages on MG about these, and they may have newer or older versions than my github repos. If you really want to use these, look at both copies and use the more recent ones. I'll try and keep things in sync, but they WILL be out of sync.

----


This is the last version of Mesa that included Mac code. It includes a partially finished accelerated 3dfx driver that uses Glide. It does not include a software renderer.
I've worked on getting the 3dfx code to build (yes, even on m68k), with both CodeWarrior and Retro68.
It isn't clear if the 3dfx code ever was finished or works, and I don't actually have a 3dfx card to test.
I've made a start on a software renderer, but its in extremely early stages.
This also builds on OpenStep/Rhapsody.

This was the only version of Mesa that had a Mac software renderer. It includes unfinished RAVE support, but is otherwise not accelerated.
I've got it working on Retro68.
I've added a few OpenGL 1.2 functions, and have "modernized" the AGL to be compatible enough at the source code level with Apple's that ships with their OpenGL 1.2 for ppc, so it can act as somewhat of a drop in replacement. This isn't useful on ppc, but very useful, if very slow, on m68k.
I've added an alternate GLUT that builds with Retro68, as the included one used PowerPlant.
Most of the examples build and work as well as can be expected.
(Note there are two copies of some things, as I am still merging different versions...look in Library Sources for the working stuff)
This also builds on OpenStep/Rhapsody.

----


This is a copy of Apple's OpenGL 1.0 SDK, that now builds with Retro68.
Most of the examples build and work as well as can be expected.
Many of them work (to a certain extent) with my Mesa 2.4.1, even on m68k.

This is a copy of Apple's OpenGL 1.2 SDK, that now builds with Retro68.
Most of the examples build and work as well as can be expected.
Many of them work (to a certain extent) with my Mesa 2.4.1, even on m68k, which is OpenGL 1.1, with just enough 1.2 to get these building.

----


This is a mac classic port of openglide, which is a 3dfx Glide 2.x compatible layer, using SDL 1.2 and OpenGL.
It can use Apple's OpenGL on ppc, or the above Mesa on m68k.
This is a static library, and does not replace the system Glide, it can not be used in place of it. (That is MacGlide https://macintoshgarden.org/apps/macglide)
This is a replacement for the real Glide at the developer level, so not terribly useful, but "interesting".

----

I've added Mesa 2.4.1 support to the latest versions of classic mac SDL 1.2 and 2, even on m68k, as an alternate to Apple's OpenGL.

Do not expect miracles from the software renderers. M68k works, but is very very slow.
I've done a lot of this just because I was interested, and it would be extremely useful if we ever get something like PiStorm for m68k (I mean 030's, 68000 already "exists"), or an accelerated gpu. (3dfx on a pci to nubus or pds adapter maybe?). So some of this is software for hardware that doesn't exist...yet...

I'm working on TinyGL (and some others) and have made a lot of progress. This would be a faster drop in replacement for Mesa as a software renderer. It would be used on m68k or ppc's without gpu's.

I'm also looking into PortableGL, newer versions of Mesa, and a few other similar projects, which would provide OpenGL beyond 1.2 on classic macs. Maybe one day...

If any of this interest you, or you are working on similar things, feel free to let me know.

I'll include binaries of demos/examples (on the MG pages) when I can for those who wouldn't be able to build by themselves. As I said, don't expect miracles, and I already know how slow or broken some things are.
Posted by: Forrest on 2026-09-03 21:12:48
Since no 68K Mac has a PCI slot (to install a 3Dfx card), what’s the purpose of porting the Glide/Mesa stuff to 68K?
Posted by: lauland1 on 2026-09-04 08:05:19
As I said "some of this is software for hardware that doesn't exist...yet...". If anyone does get a card hooked up somehow, they will find that some parts of the software will already be out there.

But mostly because I could, and it was an interesting exercise.

The openglide would allow someone to write something that used glide (and pass it on to an OpenGL, Mesa or otherwise), which I know there is zero demand for, but, again, because I could.
Posted by: lobust on 2026-09-04 11:19:27

This exists, so there remains the possibility that someone might attempt it!

I have always thought that it would be super cool to have some kind of 3d accelerator in a 68k mac, running some kind of minimal cad for example - I read somewhere that early development of the quickdraw 3d accelerator was on nubus. I'm sure the odds of one of those turning up in the wild are infinitesimally small, but you never know!
Posted by: lauland1 on 2026-09-08 10:42:24
Yeah, the very least that can come out of this is a "de facto" standard for m68k acceleration, leveraging some hardware that does exist like fpga, and some that doesn't yet exist, like a bridge to an actual 3dfx card...

For now, I think basing it so it is api compatible with Apple's ppc opengl stack, including RAVE for the lowest levels, would be prudent, so that's the direction I'm taking. I've added to the Mesa 2.4.1 AGL functions that make it compatible with ppc apple one, and have added or changed some things in Mesa and tinygl to make them "resemble" apple's opengl 1.2 more. I've also started "agl-mini" which will be apple api compatible, but only do "just enough".

FYI I'm actually going to do m68k rave "upside down". So mesa or tinygl will provide the drawing for it, since they are both working very well as software rendererers. With Apple's ppc opengl, opengl is sitting on top of RAVE, but on the m68k for now, RAVE will just be an alt, but compatible at the api level, alternate drawing interface. Since they're both drawing to the same framebuffer, it shouldn't be noticeable by software.
Posted by: lauland1 on 2026-09-10 07:39:29
Mesa 2.4.1 fully works, but is only OpenGL 1.1, with lots of added Apple compatibility and some non-functional 1.2. Speed is nothing to write home.

Mesa 3.x is in progress and is OpenGL 1.2, but the software rendering is still pixel scrambled. Once I have 3.x working, I'll move on to newer versions. So far it is "slow".

TinyGL now works as a drop in replacement with SDL. It should soon work as a (limited) OpenGL in general, am testing. in general. It is "faster" than Mesa, but is missing a LOT of OpenGL. (I've been adding non-functional things or fixing it up, to get keep it in sync with Mesa).
1