[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Positioning Objects in 3D w/ Pygame/OpenGL



Kai Weber wrote:
Hi,

what are the NeHe tutorials? Could you provide me with an URL? I just
started learning OpenGL programming with Python.

Then this is the place to go: http://nehe.gamedev.net/

I just started learning OpenGL with Python/Pygame too, and already got some neat 3D graphics going. Once you know the basics (tutorials 1-5) you might also try the Camera class I posted. I would go back and forth looking at the commented C++ tutorial pages and at the Python versions, and start tweaking the early demos to get a feel for what each line does.

Three things not obvious when I did the tutorials:
-If something's spinning all over the place, remember that the order in which you call glTranslatef and glRotatef matters greatly.
-Shapes rotate relative to (0,0,0), but that point moves whenever you use glTranslatef(). For a cube to spin on its center, its center point has to be at 0,0,0.
-You have to set the "min" and "max" filters/shading/whatever it's called after loading _every_ texture, or they'll come out all white.


Look at the bottom of each page; some have Pygame translations. There's also a ZIP of the first 10 lessons in Python, but I can no longer find it on the Pygame site. I could post the ZIP to my site if people want.

Kris