Graphics Programs Reference
In-Depth Information
comprise of hard-coded functions to achieve transformation, lighting, and texturing
effects. The OpenGL Architecture Review Board ( ARB ) created GLSL to provide
an intuitive method for programming the rendering pipeline at the vertex and frag-
ment levels. Embedded devices, such as mobiles and tablets, support the OpenGL ES
Shading Language (also known as GLSL ES or ESSL ), which is based on GLSL ver-
sion 1.20.
Please note that, from this point, unless we need to talk about the comparison
between GLSL and GLSL ES , we will refer to the latter as GLSL .
Note In 3D computer graphics, the terms graphics pipeline or ren-
dering pipeline most commonly refer to the method of converting a
3D scene (as a collection of points, lines, and polygons), which is
supported by the graphics hardware, into a 2D “raster” image (that
is, a collection of pixels or dots) as output. OpenGL and Direct3D
are the most popular 3D graphic rendering APIs, both describing
very similar graphic pipelines.
Understanding various stages in the graphics pipeline can be over-
whelming for new graphics developers. So, we don't discuss each
explicitly. However, in the context of GLSL , we surely understand
two programmable stages in the ES 2.0 graphics pipeline.
Shader Program
Shader programs (or simply, shaders ) are computer programs to control the func-
tionality of graphics pipeline in “programmable” 3D graphic rendering APIs, such as
OpenGL ES 2.0. GLSL allows us to create two types of shaders :
Vertex shader
Fragment shader
The most interesting fact about the ES 2.0 rendering pipeline is that no object can
be rendered on the OpenGL surface until a (valid) vertex and fragment shader have
been created. Don't think you can get away with a “dot” on the OpenGL surface!
Rendering a point also requires a vertex and fragment shader.
Search WWH ::




Custom Search