Header Banner
wonderhowto.mark.png
Gadget Hacks Next Reality Food Hacks Null Byte The Secret Yumiverse Invisiverse Macgyverisms Mind Hacks Mad Science Lock Picking Driverless
Home
C++

How to Add colors to 3D scenes with OpenGL for C++

Apr 15, 2010 11:37 PM
"How to Add colors to 3D scenes with OpenGL for C++" cover image

After you've learned the basics about shapes, transformations, and times, it's time to move onto learning the color scheme of things in the C++ programming language. You can't have a beautiful 3D game or program with out vibrant colors! This video lesson will show you how to add colors to 3D scenes with OpenGL for C++, so you can start making your own 3D programs.

Learn how to add color to 3D polygons and to the background. First, add glEnable(GL_COLOR_MATERIAL) to the end of initRendering, in order to enable colors. Then watch the rest to see how it's done, or click on one of the below links.

You're just going to add two calls to glColor3f. Whenever we call glColor3f, we change the current color to the indicated RGB color. Everything we draw afterwards is drawn using the new current color.

*Get the text version of this lesson.

*Download the source code.

*Try out the exercises.

Check out the other videos in this video series.

URL Preview
Add colors to 3D scenes with OpenGL for C++

Click through to watch this video on videotutorialsrock.com

External Content
www.videotutorialsrock.com

The next big software update for iPhone is coming sometime in April and will include a Food section in Apple News+, an easy-to-miss new Ambient Music app, Priority Notifications thanks to Apple Intelligence, and updates to apps like Mail, Photos, Podcasts, and Safari. See what else is coming to your iPhone with the iOS 18.4 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!