Thursday, April 5, 2007

OpenGL

Developing low level programs have always been a tough task and hence Graphics Programming, where hardware support is a must. Formerly programmers used to develop codes for graphics applications which were specific to a platform and a hardware. So for a different platform or a different hardware, they had to recode their application, which was pretty costly.
Then the Good guys at SGI (Silicon Graphics Inc.) came up with a nice solution to this problem. They specified some low level routines or methods, which are to be implemented by the hardware vendors. This specification is known as OpenGL (Open Graphics Library). OpenGL is just a specification which consists of more than 250 different functions calls and their behaviors. Hardware vendors create implementation of this functions and they do make use of hardware acceleration whenever possible. These functions perform all the low level tasks specific to a hardware.
Now the programmers have a nice abstraction layer over hardwares. If they use these functions to develop their applications, then there applications will run on all the hardwares that support the above 250+ functions or more accurately which follow OpenGL specification. There are also some software implementation of OpenGL e.g. Mesa. Mesa can be used for the hardwares that do not follow OpenGL specifications.
Still working with OpenGL means dealing with primitives, which makes the coding tough. So there are some layers/abstractions atop OpenGL to make the life of coders more simpler and in a way aid them in developing more complex stuffs. One good example of such a library is GLU (OpenGL Utility Library). GLU generally comes with OpenGL.
Also some stuffs like Mouse input, Keyboard input, window control etc are platform dependent. So to aid OpenGL programmers in developing Platform independent codes some toolkits are also developed. GLUT(OpenGL Utility Toolkit) is an example of such a library that acts as a complementary to OpenGL. Some other flavours of GLUT are also there eg.OpenGLUT and FreeGlut.
http://www.opengl.org/
http://www.mesa3d.org/
http://openglut.sourceforge.net/
http://freeglut.sourceforge.net/

No comments: