68k OpenGL, Mesa and Glide work and lots of "useful" source code

Relating to a 68k application

lauland

Tinkerer
Dec 12, 2023
41
31
18
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.

----

https://github.com/laulandn/openglide
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.
 
Last edited: