Jump to content
  • Advertisement
Sign in to follow this  
3dmodeler

OpenGL beginner question

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am still learning openGl. How can you change background color. I know how to do that What i want is to make the top half one color and the bottom half another also i want to be able to control those colors by using the arrow keys, Example If i push the left key (top color) it will go from light blue to dark blue and the same for the right key. The bottm screen will be a different color 3dmodeler

Share this post


Link to post
Share on other sites
Advertisement
Draw a plane just over the far plane, do what you want modifiying the vertices color. You have this in my master thesis, download it and read page 57.

Download "project work" pdf from 1.0"
http://sourceforge.net/projects/colladaloader/

The result is a nice gradient or background like this:
http://www.gamedev.net/community/forums/topic.asp?topic_id=450761

You can use that code, and add easily what you said aobut changing its color.

Hope it helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!