List of OpenGL Functions
========================
glBegin(<shape>), shape can be GL_LINES,GL_LINE_STRIP, GL_LINE_LOOP, GL_POINTS, GL_POLYGON, GL_QUADS,GL_QUAD_STRIP, GL_TRIANGLES, GL_TRIANGLE_FAN, 
                               GL_TRIANGLE_STRIP
glBindTexture(GL_TEXTURE_2D,<address-to-texture>), for example: glBindTexture(GL_TEXTURE_2D, texture)
glCallList(<list-name>), calling the display list, for example: glCallList(MY_CIRCLE_LIST)
glClear(<mask>), mask is either GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT. Used GL_COLOR_BUFFER_BIT
glClearColor(<R,G,B,Alpha>), for example, glClearColor(0.0, 0.0, 0.0, 1.0)
glDeleteTextures(<number-of-texture,address of texture>), delete the texture, for example: glDeleteTextures( 1, &texture );
glFlush(), flush everything to the screen
glGenTextures(<number-of-texture,pointer to texture>), for example:glGenTextures(1, &texture[0]), where texture is GLuint texture[1]
                                                       use glBindTexture next
glLoadIdentity(), loads the 4x4 identity matrix
glMatrixMode (GL_PROJECTION), sets the matrix mode to projection to play with the camera
glMatrixMode (GL_MODELVIEW), MODELVIEW is the default matrix mode, allows us to play with the objects
glNewList(<list-name>, GL_COMPILE), new display list, for example: glNewList(MY_CIRCLE_LIST, GL_COMPILE)
glScalef(<xyz-multiples>), for example: glScalef( 2.0, 0.5, 1.0 ) would be twice the x, half the y, and same z
glTexCoord2d(<s,t>), give the texture coordinate, bind with vertices, s and t are between 0 and 1. for exmaple: glTexCoord2d(0.0,0.0);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, <parameter>), sets the environment for replacing or blending the texture, for example: 
             glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ), parameter of GL_MODULATE with blend the texture with what's
             underneath, parameter of GL_DECAL replaces what's on the surface
glTexImage2D(GL_TEXTURE_2D,<0-for-level-of-mipmap>,<3-for RGB>,<width>,<height>,<0-for-no-border>, <GL_RGB(A)>, <type-of-data>,
             <pointer-to-image-data>), for example: glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, 
             GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); or 
             glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
glTexParameter(GL_TEXTURE_2D,<parameter-name>,<parameter-value>), sets the parameter for what quality of texture to render,
             the name can be: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T
             the value for texture filters can be: GL_NEAREST, GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR
             for example: 
             glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
	       glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
             glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
             glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
             glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
             glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR );
glutEnterGameMode(), enter full screen
glutGameModeString("<w x h:bit@hertz>"), for example: glutGameModeString( "640x480:32@65" );
glutLeaveGameMode(), leave full screen
gluBuild2DMipmaps( GL_TEXTURE_2D, <#-of-color-component, width, height, format, type, pointer-to-data> ), generates the mipmap, 
             for exmaple:gluBuild2DMipmaps( GL_TEXTURE_2D, 3, width, height, GL_RGB, GL_UNSIGNED_BYTE, data ); 
gluLookAt(<eye-xyz>,<center-xyz>,<up-vector-xyz>), sets the view, for example: gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
gluPerspective(<angle-in-degree, aspect w/h, near, far>), for example: gluPerspective (60, (GLfloat)w / (GLfloat)h, 1.0, 100.0);
glutKeyboardFunc (keyboard), in main, give the function name that checks for key pressed, a sample keyboard function:
                             void keyboard (unsigned char key, int x, int y) 
glutPassiveMotionFunc(<function-name>), in main, give the function name that checks for keys, a sample mouse function: void mouseMovement(int x, int y)
glutSolidSphere (<radius, slices, stacks>), drawing a sphere, for example, glutSolidSphere (2,10,10), Solid can be replaced by Wire
glutSwapBuffers(), similar to glFlush, but allows smooth motion to be displayed, needs GLUT_DOUBLE instead of GLUT_SINGLE
glutWireCube(<double>), make a wired cube, looks like it needs gluPerspective for this, for example: glutWireCube(2.0)
glViewPort(<GLint-xy>,<width>,<height>), make a viewport, for example: glViewport (0, 0, (GLsizei)w, (GLsizei)h), Wire can be replaced by Solid

Functions for basic lighting
============================
glEnable (GL_DEPTH_TEST);
glEnable (GL_LIGHTING);
glEnable (GL_LIGHT0);
glEnable(GL_COLOR_MATERIAL);

Minimal main functions
===================
int main (int argc, char **argv) {
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_SINGLE);
glutInitWindowSize (500, 500); //set the size of the window
glutInitWindowPosition (100, 100); //set the position of the window
glutCreateWindow ("A basic OpenGL Window");
glutDisplayFunc (display);
glutMainLoop ();
return 0;
}

Linux command needed before compiling OpenGL code
=================================================
sudo apt-get install build-essential freeglut3-dev
Sample OpenGL Compilation Command
gcc main.cpp -lGL -lglut
./a.out