PDA

View Full Version : Glut Tut?



AsylumX
05-14-2002, 11:32 AM
Hey, guys, I'm looking for a good glut tutorial to help me get through my computer graphics class. The reason I need glut is that I need any system I write to be portable to unix, and also because the prof. recommended it. I'm reading the redbook but it seems like whenever I try to write code that isn't directly out of the book, I get very unexpected results!

Thanks for your recommendations (in advance).

-AsylumX

nexusone
05-14-2002, 11:42 AM
This is a good site http://www.xmission.com/~nate/opengl.html

Also what type of problems are you having?



Originally posted by AsylumX:
Hey, guys, I'm looking for a good glut tutorial to help me get through my computer graphics class. The reason I need glut is that I need any system I write to be portable to unix, and also because the prof. recommended it. I'm reading the redbook but it seems like whenever I try to write code that isn't directly out of the book, I get very unexpected results!

Thanks for your recommendations (in advance).

-AsylumX



[This message has been edited by nexusone (edited 05-14-2002).]

AsylumX
05-14-2002, 11:57 AM
Well, I'm learning from the redbook and from my prof, and the thing is if I take the code from the redbook and alter it, I get strange results.

Example... The rotation program at the end of chapter #1.

If I alter the glRotate3f so that it rotates on a different axis, the rectangle looks as if it's rotating behind a square opening, because if it rotates through a corner, the dimensions change... I'm not sure if I explained that too well so let me know.

Anyways, thanks, I'll try out the tut you posted!

-AsylumX

Deiussum
05-15-2002, 04:19 AM
Sounds like possibly when it rotates it's getting clipped by the far clip plane? In you glFrustum/gluPerspective or glOrtho try increasing the size of the back plane. If you're using gluOrtho2D, you'll have to switch to glOrtho because gluOrtho2D sets the near/far clip planes as -1/1.

AsylumX
05-15-2002, 02:29 PM
Ok thanks, I think I got that part figured out now (it was glOrtho's settings). Now, I can't get the depths to match up quite right, but I'll figure it out. It's all part of learning something new, right?

-AsylumX