Install OpenGL in Ubuntu13.04. Sudoapt-getinstallbuild-essentialsudoapt-getinstalllibgl1-mesa-devsudoapt-getinstalllibglu1-mesa-devsudoapt-getinstallfreeglut3-dev tester # include & lt; GL/
Install OpenGL in Ubuntu 13.04.
Sudo apt-get install build-essential
Sudo apt-get install libgl1-mesa-dev
Sudo apt-get install libglu1-mesa-dev
Sudo apt-get install freeglut3-dev
Test procedure
# Include
Void init (void ){
GlClearColor (0.0, 0.0, 0.0, 0.0 );
GlMatrixMode (GL_PROJECTION );
GlOrtho (-5,-5, 5, 5, 5, 15 );
GlMatrixMode (GL_MODELVIEW );
GluLookAt (0, 0, 10, 0, 0, 0, 0 );
Return;
}
Void display (void ){
GlClear (GL_COLOR_BUFFER_BIT );
GlColor3f (1.0 );
Gluwireteapot (3 );
GlFlush ();
Return;
}
Int main (int argc, char * argv []) {
Gluinit (& argc, argv );
Fig );
Gluinitwindowposition (0, 0 );
Gluinitwindowsize (300,300 );
Valley createwindow ("OpenGL # D View ");
Init ();
Gludisplayfunc (display );
Glumainloop ();
Return 0;
}
Compile and run
Gcc test. c-o test-lGL-lGLU-lglut
./Test. c
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2