<< Chapter < Page Chapter >> Page >
The first program in this OpenGL tutorial allows the user to view a blue 3D sphere on the screen.

:Discussion The first example in this set of tutorials is a program to draw a simple wireframe sphere. We will take this first step and go further in the tutorials that follow, but this serves as a simple test bed for us to try displaying any object or figure. Simply change the line that draws the glutWireSphere with the line(s) for your object to easily test your coding for errors.

Sample code: Click here to see the sample code: simple.c

Executable example: Click here for a running demo: simple.exe

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Programming 3d graphics with opengl. OpenStax CNX. Nov 05, 2004 Download for free at http://cnx.org/content/col10246/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Programming 3d graphics with opengl' conversation and receive update notifications?

Ask