In 1982, a Stanford University professor named Jim Clark opened the first graphics computer company, the Silicon Graphics Computer System, which became known as SGI. SGI technicians need a standardized way for 3D operation and transformation, so they design an interface programming API (API) called IrisGL. This IrisGL can only be used on output hardware from SGS (not open-standard). At the same time, other vendors including Sun Microsystems, IBM and Hewlett-Packard also released 3D hardware products on the market. They use another type of API called PHIGS. Since other vendors are also launching 3D hardware products on the market, SGI's marketing scope has also diminished.
To re-boost sales of their products to the market, eventually SGI change IrisGL to open-standard. However due to licensing and patent reasons, they can not launch the open-standard IrisGL. Finally they created a new API based on IrisGL named OpenGL. (https://anggaradian.wordpress.com/2013/04/28/sejarah-and-introduction-opengl/)
OpenGL is a low-level graphic spe- cific that provides functions for creating primitive graphics including dots, lines, and circles. OpenGL is used for
grfis.OpenGL programming purposes is Open-Source, multi-platform and multi-language and is used to define an object, the object both 2-dimensional and 3-dimensional objects. OpenGL is also an application programming interface (application programming interface (API) that is independent of device and platform used, so that OpenGL can run on operating systems Windows, UNIX and other operating systems.
OpenGL was originally designed to be used in programming languages C / C ++, but in its development OpenGL can also be used in other programming languages such as Java, Tcl, Ada, Visual Basic, Delphi, and Fortran. However OpenGL is packaged differently according to the programming language
used. Therefore, the OpenGL package can be downloaded at http://www.opengl.org according to the programming language to be used.
OpenGl serves two purposes:
To hide the complexity of interfacing with various 3D accelerators, showcased by the programmer with one, uniform API.
To hide the different capabilities of the hardware platform, by all that require supporting the full implementation of feature setengl set (using emulation software if needed).
For OpenGL programming using C ++, additional libraries are required:
- glut.h copied to drive: \ Program Files \ Microsoft Visual Studio 2010 \ Vc \ include \ GL
- glut32.lib copied to drive: \ Program Files \ Microsoft Visual Studio 2010 \ Vc \
- libglut32.dll is copied to drive: \ Windows \ System
Classification of Functions
Primitive: geometric, imagesAttribute: color, line type, light, texture
Viewing: virtual cameraControl: turn fuction ON / OFF
Windowing: window, mouse, keyboard
OPENGL WORK WAY
OpenGL is more directed to procedural than a descriptive graphic API. To describe the scene and how it performs, programmers actually know more to determine the things needed to produce the desired effect. The move involves calling many openGL commands, the command is used to describe primitive graphics such as dots, lines and polygons in three dimensions. In addition, openGL supports lighting, shading, texture mapping, blending, transparency, and many other special effects capabilities.
OpenGL has a wide range of functions and usage commands, the use of openGL requires additional libraries to be put on
directory system from windows (OS), OpenGL32.dll, Glu32.dll, Glut32.dll
Initialization initial
The core of this stage is to set the view port and perspective for the appearance of objects into the monitor screen, viewport is the size of the monitor screen (image) used to display the object, while the perspective is the z axis settings in the appearance of 3-dimensional objects, so that the user can see the object as if in the field of 3 dimensions (XYZ), in addition to the depiction of objects performed by the programmers can also use 3-dimensional coordinates. In addition to the above two purposes at this stage is also done initial connection with openGL library, this connection is done so that the functions provided in openGL can be used. Function / procedure used:
LoadGlut ('glut32.dll) - openGL library call
InitGL - initial openGL initialization to do
glViewport - for viewport settings
glMatrixMode - viewport settings
gluPerspective - setting perspective