PDA

View Full Version : Draw a earth and rotate it?



jiangerlai
03-11-2003, 01:53 PM
Hi,I am a beginner.I have only used opengl in visual c++ 6.0 for a week.I have draw a sphere.But I don't know how to paint it to make it looking like a real earth and how to
rotate it then. Longing for your help with great appreciation!!

jleffelm
03-11-2003, 02:22 PM
Originally posted by jiangerlai:
Hi,I am a beginner.I have only used opengl in visual c++ 6.0 for a week.I have draw a sphere.But I don't know how to paint it to make it looking like a real earth and how to
rotate it then. Longing for your help with great appreciation!!

For rotation, you should be using glRotatef( Angle, x, y, z ), you can look at the following for an example of it:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=04

Um, try using a texture map for the painting of the earth. Check out the following for an example:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06

jiangerlai
03-11-2003, 04:09 PM
Thanks a lot!
I am a Chinese student. I am very glad that you answered my quention.