OpenGL libraries and MPW

I use MPW as my development environment on an 8600 with OS 9. I just downloaded the OS9 OpenGL SDK from apple, and I don't know what folders to put the various files in.

I assume that the Source, Resources, Documentation and Sample Apps folders can go anywhere, but that the contents of the Headers and Libraries folders need to go somewhere special, presumably somewhere inside the Interfaces&Libraries folder.

At the moment I have the contents of the Headers folder inside Interfaces & Libraries: Interfaces: CIncludes, and that seems to work. (it doesn't claim it can't find glut.h, etc)

However, when I compile I get long red lists of unresolved references, and I suppose this means it can't find the actual code in the libraries. Am I right?

It doesn't really matter where you put the libraries, as long as when you include them in your MakeFile you use the right path to them. But if you didn't you would be getting an error about not being able to find the library.

I put the OpenGLLibraryStub, OpenGLMemoryStub and OpenGLUtilityStub in MPW:Interfaces&Libraries:Libraries:SharedLibraries folder, and the header files in MPW:Interfaces&Libraries:Interfaces:CIncludes . In the make files. In a makefile generated by MPW, the Libraries part looks like this :
LibFiles-PPC = "{SharedLibraries}OpenGLLibraryStub"

I also added the other libraries I mentioned earlier. Hope this helps!

Its been a while since I've worked with OpenGL under MPW, but the GLUT & MUI libraries are built with (and for) Codewarrior and as far as I know there is no way to use them in MPW. There are two options for you though, write a generic app skeleton and bind a gl context to a window (or windows or fullscreen, etc) or grease the GLUT & MUI libraries to build under MPW. I've taken both routes and to be quite honest unless you want to have cross platform capabilities, taking the first route may be a little more work, but will probably pay off more in the end. As for building the GLUT library, as far as I can remember not all of the source files are included into the project (could someone with Codewarrior verify this?) and a little bit of work needs to be done to patch up some multi-line macros so that they work with MPW. Some code like the ccommand( &argc, argv ) (i think, its in the glutInit call) can just be commented out for the most part too.

I have some binaries of the libraries (and maybe the makefiles) for some older builds of the sdk (maybe 1.0) so I'm not sure what version of glut it is, but your welcome to them if you'd like.

GLUT is a great way to get things on the screen without hassle, don't get me wrong, its just too bad that the sdk doesn't come with MPW built libraries. I've posted the makefile as well as the glut library on my idisk, in the public files folder.

thanks for the offer but I think I'll just get to grips with GL alone. I've already cannibalised enough of a framework from other stuff I've done and examples and I think I've got it... nearly. but that's another story (see general programming)