You Like My Tutorials? Click The Banner To Keep 'Em Coming!

glGameDeveloper(): The Game Developer's Source for OpenGL Coding
Main Menu
Latest News
Archived News
Tutorials
Links
E-Mail Me

Other
Message Board
My Guestbook

Tutorials -- Drawing and Coloring Primitives
 


Drawing and Coloring Primitives in OpenGL Page 3 of 3
< Previous Jump to Page: 1 | 2 | 3 Next >

If you want to see the bottom of the pyramid, change the second parameter of the glRotate function to 1, like so:

	glRotatef(rotate, 1, 1, 0);

Now OpenGL will rotate on the y axis, as before, along with the x axis. Note that x is left/right, y is up/down, and z is front/back.

Mess around with this code until you get a good idea of how to draw polygons. Add more polygons to your scene, and give them different colors. When I first got started, I made the Nintendo64 logo out of polygons. Took forever, but it gave me a great head start on drawing in OpenGL. Try doing something like that, and send it on in so I can see it. If it's good I might just post it here.

That's it for this tutorial. Any questions? Feel free to ask me.

Drawing and Coloring Primitives in OpenGL Page 3 of 3
< Previous Jump to Page: 1 | 2 | 3 Next >

This site best viewed with MS Internet Explorer 5.0 at 16-bit color and at least 800x600.

All Contents of this site are Copyright 1999, 2000 Joe Zimmerman. No part of this site (code, HTML, etc.) may be reproduced without my permission.

Click Here!