PDA

View Full Version : Newbie to OGL needs help



SadMac
03-14-2001, 06:31 AM
I've just myself an OGL book. Unfortunately it doesn't tell you how to set up the basics. I've decided to go with Apple's SetupGL to start off with, as it appears to be the simplest method. Unfortunately, when I run my prog, SetupGL claims that the renderer check has failed. I've got OGL installed and I've got an OGL capable graphcs card (voodoo3). Anyone else had this problem. I've tried messing around with the AGL requirements for the renderer, but it gives me the same error no-mater what.

Any help would be much appreciated.

phenotic
03-15-2001, 05:00 PM
If you are new to openGL-I suggest using GLUT first. You can get it from the Apple developer kit if you don't already have it. I'm fairly new to openGL myself so I can't comment on the efficiency of it but it takes care of all of the Apple specific junk required to get up and running. For example-to get a opengl window up, you simply need to init the GLUT interface-register a couple callbacks and make a single call to a function to have a gl capable window-ready to go. I would check it out. There is an extensive tutorial section on it posted on the main site as well.

best of luck
phenotic

03-15-2001, 08:20 PM
Make sure you have your libraries setup to be linked.
you'll need the following ones for most of nehe's opengl tutorials.

glut.lib
openglmemorystub
openglutilitystub
mui.lib
opengllibrarystub
tk.lib //not necessary unless you are doing textures.

then off course there are the headers.

Another question, what compiler are you using?

Cheers

SadMac
03-16-2001, 07:54 AM
Unfortunately, I'm using MPW. Which means I can't use either mui.lib or glut.lib without recompiling them (which I have done). But I've tried glut, and got it to work, but I get about 5fps at 1024x768 cos it's all done in software. I'd use glut if I knew a way to get it to use hardware rendering. I've even tried using the glutInitGameMode call. Any advice on how to do this would be much appreciated.

SadMac
03-16-2001, 07:59 AM
Oh, I got SetupGL to get past that bug. Now it goes fullscreen and then bombs out to MacsBug saying it couldn't get the aglPixelMode or something. I was under the impression that SetupGL handled all that for me. I've also tried to compile Apple's own program for SetupGL but it refuses to link, saying that qd (.thePort) could not be linked. Which libraries does this program need to compile, as I can't open the CodeWarrior project file to find out.

03-20-2001, 03:24 PM
Phonetic,

I'm having trouble finding any info on Apple's site about OpenGL besides the main page and an agl reference; they also seem to have taken away the links to the OpenGL SDK, but that could be a problem on my end. Certainly no luck finding a tutorial on GLUT, though I would sorely like one.

For a good start in OpenGL, the best tutorials for Maccers seem to be at http://nehe.gamedev.net/opengl.asp .

There's working Mac versions of all the tutorials.

While I'm on it, why is the current Apple programming community so sparse? It's depressing. With all the new games and new interest in Macs and OS X, where are all the programmers?

theEnigma

03-20-2001, 11:59 PM
www.idevgames.com (http://www.idevgames.com) is where a few mac programmers lurk. But yeah it is depressing to have so few places where Mac programmers get together and exchange ideas and help push the cummunity forward. http://www.opengl.org/discussion_boards/ubb/frown.gif

Cheers

Tilgovi
04-07-2001, 04:13 PM
When I first started doing OpenGL on my mac I found this site: http://www.sover.net/~jams/Morgan/DrawSprocket_AGL/

It may be what SetupGL is based on. It worked perfectly for me, no problems. I have the ATI Rage 128 built in with the slot-loading iMac, no problems here.

I'm using MPW, and yes, it is annoying to recompile the libraries, but it does work.

If you want the code on the above site to use hardware acceleration I think you just need to find the section where it specifies attributes (AGL_RGBA, AGL_DOUBLEBUFFER, etc.) and add AGL_ACCELERATED.

Hope it helps,
-Tilgovi