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

You already know how to use your phone. With Gadget Hacks' newsletter, we'll show you how to master it. Each week, we explore features, hidden tools, and advanced settings that give you more control over iOS and Android than most users even know exists.

Sign up for Gadget Hacks Weekly and start unlocking your phone's full potential.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!