OpenGL Operation 11
OpenGL 2.0
Common
void GetMaterialiv(enum face, enum pname, T
*
params)
–
void Lightf[v](enum light, enum pname, T param)
–
void Lighti[v](enum light, enum pname, T param)
–
void GetLightfv(enum light, enum pname, T
*
params)
–
void GetLightiv(enum light, enum pname, T
*
params)
–
void LightModelf[v](enum pname, T param)
–
void LightModeli[v](enum pname, T param)
–
void Enable/Disable(COLOR MATERIAL)
–
void ColorMaterial(enum face, enum mode)
–
void ShadeModel(enum mode)
–
n The OpenGL 2.0 or any user defined lighting can be implemented by writing appropriate vertex
and/or pixel shaders.
ShadeModel is no longer supported as flat vs. gouraud shading only applied to the predefined color
vertex attribute. Predefined vertex attributes are not supported by OpenGL ES 2.0. q
2.15 Vertex Shaders
OpenGL 2.0 supports the fixed function vertex pipeline and a programmable vertex pipeline using vertex
shaders. OpenGL ES 2.0 supports the programmable vertex pipeline only. OpenGL ES 2.0 allows applica-
tions to describe operations that occur on vertex values and their associated data by using a vertex shader.
OpenGL ES 2.0 provides interfaces to directly load pre-compiled shader binaries, or to load the shader
sources and compile them. An OpenGL ES implementation must support one of these methods for loading
shaders.
2.15.1 Loading and Compiling Shader Sources
The ShaderSource command loads source code into a vertex or a fragment shader object. Once the source
code for a shader has been loaded, a shader object can be compiled using the CompileShader command. A
string that contains information about the last compilation attempt on a shader object, called the info log,
can be obtained with the GetShaderInfoLog command. The GetShaderSource command returns the shader
source for the specified shader object.
The ReleaseShaderCompiler command allows the OpenGL ES implementation to release the resources
allocated by the shader compiler. This is a hint from the application and is no indicator that the compiler
will not be used in the future. If shader sources are loaded and compiled after ReleaseShaderCompiler has
been called, the CompileShader call is supposed to successfully compile the shaders provided there are no
errors in the shader source(s).
The GetShaderPrecisionFormat command returns the range and precision for various precision formats
supported by the implementation.
void GetShaderPrecisionFormat(enum shadertype, enum precisiontype, int *range, int *precision)
shadertype must be VERTEX SHADER or FRAGMENT SHADER. precisiontype can be LOW FLOAT, MEDIUM -
FLOAT, HIGH FLOAT, LOW INT, MEDIUM INT or HIGH INT. range returns the minimum and maximum