Thursday, April 30, 2015

Introduction to OpenGL Core Profile

OpenGL is one of the most popular multi-platform application programming interface (API) used to produce three dimensional computer graphics applications.

Since version 3.0, it is known as the new era in the evolution of OpenGL because a wide range of new features were added as well as marking the old fixed functions as deprecated that will be completely removed from the core profile in version 3.1. Because of deprecation, GL ARB compatibility extension was added to OpenGL in an attempt to enable graphic programmers to access the old fixed functions.

In this work, we have decided to opt OpenGL core profile 3.3 based primarily on OpenGL shading language (GLSL) because it is efficient programming and programmable. Moreover, it easily switches to OpenGL ES or WebGL which are compatible with modern OpenGL core profile.




Look at image above, it is shown that the given geometric data will be processed through a series of shaders such as vertex shading, tessellation shading, and geometry shading before it is sent to rasterizer which is responsible for generating fragments for any primitive residing inside the clipping region and generating a fragment shader for each of the generated fragments. The shader enables developers to fully control for which shader stages will be used and what each of them performs. It also plays an essential role in developing OpenGL application.

One of the primary goals for 3D computer graphics application is speed. That is why OpenGL introduces the concept of buffer. Buffers are used by OpenGL for storing vertex attribute data such as positions, normal vectors, colors and any others required by vertex shader in a buffer object. OpenGL is said to support several kinds of buffers such as vertex buffer, pixel pack buffer, and pixel unpack buffer. The preceding buffer will be introduced in the following section whereas the latter two buffers can be consulted with OpenGL specification.

No comments:

Post a Comment