. (dot), vector access operator, 101โ102
#elif
directive, 116
#else
directive, 116
#error
directive, 116
#extension
directive, 116
#if
directive, 116
#pragma
directive
definition, 116
enabling global invariance, 123
[ ] (square brackets), array subscript operator, 101โ102
new features, 11
overview, 230
2D textures
attached to framebuffer objects, 338โ339
base formats, 227
attached to framebuffer objects, 339โ340
new features, 12
overview, 229
3D textures, noise
water wave simulation, 404
abs
function, 467
acos
function, 465
acosh
function, 466
Advanced RenderMan: Creating CGI for Motion Pictures, 407
Aliasing artifacts. See Anti-aliasing; Mipmapping.
all
function, 473
Android 4.3 (API 18), 451
Android NDK, 451
Android SDK, 451
Angles, built-in functions, 465โ466
Animation, 2D images. See 2D texture arrays.
procedural textures, 407โ410
any
function, 473
Apache Ant, 451
ARM Mali OpenGL ES Emulator, 448
Array buffer objects, 140โ141
Arrays, 104
Arrays of structures, 128. See also Structures.
asin
function, 465
asinh
function, 466
Asynchronous objects, querying, 442โ443
atan
function, 465
atanh
function, 466
Attributes. See also specific attributes.
active, counting, 77
active, querying, 93
largest name, getting, 77
Backward compatibility, 17โ18
Binaries. See Program binaries.
Binding
program objects, example, 39
renderbuffer objects, 330โ331
texture objects, 231
vertex array objects, 151
vertex buffer objects, 141
Blend equations, new features, 17
Blending
per-fragment operations, 10
Boolean occlusion queries, new features, 15
Buffer object to buffer object copies, new features, 16
deleting, 150
drawing with and without, 145โ150
initializing, 145
updating, 145
Buffer objects, mapping
changing screen resolution, 157
data storage pointer, getting, 155โ156
flushing mapped buffers, 158โ159
Buffer objects, new features. See also Uniform buffer objects; Vertex buffer objects.
buffer object to buffer object copies, 16
buffer subrange mapping, 16
pixel buffer objects, 16
sampler objects, 16
sync objects, 16
uniform buffer objects, 16
vertex array objects, 16
Buffer subrange mapping, new features, 16
Buffers, fragments. See also Pbuffers (pixel buffers).
back, 298
depth of, 298
front, 298
requesting, 299
size of, 298
types of, 298
Built-in functions. See also Functions.
abs
function, 467
acos
, 465
acosh
, 466
all
, 473
any
, 473
asin
, 465
asinh
, 466
atan
, 465
atanh
, 466
ceil
, 468
clamp
, 469
cos
, 465
cosh
, 466
cross
, 473
degrees
, 465
description, 107
determinant
, 473
dFdx
, 484
dFdy
, 484
distance
, 473
dot
, 473
equal
, 473
exp
, 466
exp2
, 466
faceforward
, 473
floatBitsToInt
, 470
floatBitsToUInt
, 470
floating-point pack and unpack, 471โ472
floor
, 467
fract
, 468
fragment processing, 483โ484
fwidth
, 484
greaterThan
, 475
greaterThanEqual
, 475
intBitsToFloat
, 470
inverse
, 474
inversesqrt
, 467
isinf
, 470
isnan
, 470
length
, 473
lessThan
, 475
lessThanEqual
, 475
log
, 466
log2
, 467
matrix, 474
matrixCompMult
, 474
max
, 468
min
, 468
mix
, 469
mod
, 468
new features, 15
normalize
, 473
not
, 475
notEqual
, 475
outerProduct
, 474
packHalf2x16
, 472
packSnorm2x16
, 471
pow
, 466
radians
, 465
reflect
, 473
refract
, 473
round
, 468
roundEven
, 468
sign
, 467
sin
, 465
sinh
, 466
smoothstep
, 470
sqrt
, 467
step
, 470
tan
, 465
tanh
, 466
texture
built-in, 478
textureGrad
, 481
textureGradOffset
, 481
textureLod
, 479
textureOffset
, 480
textureProj
built-in, 479
textureProjGrad
, 482
textureProjGradOffset
, 482
textureProjLod
, 480
textureProjLodOffset
, 480
textureSize
, 478
transpose
, 474
trunc
, 467
uintBitsToFloat
, 470
unpackHalf2x16
, 472
unpackSnorm2x16
, 471
vector relational, 475
ceil
function, 468
centroid
keyword, 115
Checkerboard example, 405โ407
clamp
function, 469
Client space, 126
Clipping
lines, 177
point sprites, 177
triangles, 177
Color
color depth, simulating, 314
depth, simulating, 314
dithering, 314
specifying for multiple render targets, 321โ322
Color buffers
fragment operations, 298โ299, 302. See also Fragments, buffers.
column_major
qualifier, 110
Combining texture maps, 286โ287
Compiling shaders, example, 36โ38
Compressing textures, 262โ265
Compression formats, textures, 264โ265
Conditional statements. See Control flow statements.
Conditional tests, preprocessor directives, 115โ117
const
declarations, examples, 102โ103
Constant store, 109
Constants, description, 102โ103
Constructors. See Variable constructors.
Control flow statements, 107โ108
Coordinate systems
guard band region, 177
overview, 175
Copying
pixels in framebuffer objects, 342โ344
textures from the color buffer, 269โ273
cos
function, 465
cosh
function, 466
fragment shaders, example, 35โ36
program objects, example, 38โ39
renderbuffer objects, 329โ330
texture objects, 230
vertex array objects, 144, 151
vertex buffer objects, 141
vertex shaders, example, 35โ36
cross
function, 473
Cubemaps
seamless filtering, new features, 12, 241
Cygwin, 451
Data types
type conversion, 100
Deferred shading, multiple render targets, 320โ321
Degenerate triangles, 172
degrees
function, 465
Deleting
buffer objects, 150
framebuffer objects, 346โ347
program objects, 75
renderbuffer objects, 346โ347
shaders, 70
vertex array objects, 154
Deletion status, querying, 77
Depth buffer test, 311
Depth buffers
attached to framebuffer objects, 337โ338
sharing, 329
Depth buffers, fragment operations. See also Fragments, buffers.
Depth-of-field. See Rendering, to textures.
Depth test, per-fragment operations, 10
Depth texture compare, 245โ246
determinant
function, 473
dFdx
function, 484
dFdy
function, 484
Directional light, example, 199โ202
Directives. See Preprocessor directives.
disable
behavior, 117
Displacement mapping, vertex shaders, 214โ215
distance
function, 473
Dot (.), vector access operator, 101โ102
dot
function, 473
Double buffering, example, 41
Drawing fragments, example, 35โ36
Drawing primitives
geometry instancing, 169โ172
multiple disconnected primitives, 168โ169
multiple primitives, different attributes, 169โ172
Drawing surface, creating, 325โ327. See also FBOs (framebuffer objects).
Dynamic reflections. See Rendering, to textures.
description, 19
display server, connecting to, 44โ45
include files, 20
libraries, 20
programming with OpenGL ES 3.0, 20
rendering context, creating, 19
rendering surfaces, creating, 19
EGL error codes
EGL_BAD_DISPLAY
, 46
EGL_BAD_NATIVE_WINDOW
, 55
with the esUtil
library, 65โ66
eglChooseConfig
function, 51โ53
EGLConfig
data type
choosing surface configurations, 51โ53
determining available surface configurations, 46โ47
EGLConfig
data type, attributes
EGL_CONTEXT_CLIENT_VERSION
attribute, 61
EGLContext
s
associating with an EGLSurface
, 62โ63
EGL_CORE_NATIVE_ENGINE
, 67
eglCreateContext
function, 60โ62
eglCreatePbufferSurface
command, 56โ60
eglCreateWindowSurface
function, 53โ56
eglGetConfigs
function, 47
eglGetDisplay
function, 44โ45
eglGetError
function, 45
EGL_HEIGHT
attribute, 57
EGL_LARGEST_PBUFFER
attribute, 57
eglMakeCurrent
function, 62โ63
EGL_MIPMAP_TEXTURE
attribute, 57
EGL_NO_CONTEXT
error, 58
EGL_NOT_INITIALIZED
error, 46โ47
eglSwapBuffers
function, 41
EGL_TEXTURE_FORMAT
attribute, 57
EGL_TEXTURE_TARGET
attribute, 57
eglWaitClient
function, 66โ67
EGL_WIDTH
attribute, 57
Element buffer objects, 140โ141
ARM Mali OpenGL ES Emulator, 448
OpenGL ES 3.0 Emulator, 447โ449
PowerVR Insider SDK v 3.2+, 448
PowerVR OpenGL ES 3.0 Emulator, 449โ450
Qualcomm Adreno SDK v3.4+, 447
enable
behavior, 116
Entity names, querying, 429โ435
example, 370
equal
function, 473
Error checking, querying for error codes, 45
Error codes. See also specific codes.
querying for, 45
summary of, 23
esCreateWindow
function, 34, 485โ486
esGenCube
function, 489
esGenSphere
function, 488
esGenSquareGrid
function, 489
esLoadProgram
function, 487โ488
esLoadShader
function, 487
esLoadTGA
function, 488
esLogMessage
function, 489
esMatrixLoadIdentity
function, 493
esMatrixMultiply
function, 493
esOrtho
function, 491
esPerspective
function, 198โ199, 491
esRegisterDrawFunc
function, 486
esRegisterKeyFunc
function, 487
esRegisterShutdownFunc
function, 487
esRegisterUpdateFunc
function, 486
esScale
function, 492
esTranslate
function, 492
transformation functions, 490โ494
esCreateWindow
function, 34, 485โ486
esGenCube
function, 489
esGenSphere
function, 488
esGenSquareGrid
function, 489
esLoadProgram
function, 487โ488
esLoadShader
function, 487
esLoadTGA
function, 488
esLogMessage
function, 489
esMain
function, 34
esMatrixLoadIdentity
function, 493
esMatrixMultiply
function, 493
esOrtho
function, 491
esPerspective
function, 198โ199, 491
esRegisterDrawFunc
function, 486
esRegisterKeyFunc
function, 487
esRegisterShutdownFunc
function, 487
esRegisterUpdateFunc
function, 486
esScale
function, 492
esTranslate
function, 492
esUtil
library, creating EGL windows, 65โ66
ETC/EAC texture compression, 12, 264โ265
Example code. See also specific examples.
creating. See Hello Triangle.
exp
function, 466
exp2
function, 466
Exponential built-in functions, 466โ467
Extension behaviors, 116โ117
faceforward
function, 473
FBOs (framebuffer objects). See also Renderbuffer objects.
checking for completeness, 341โ342
definition, 327
vs. EGL surfaces, 329
new features, 17
performance tips, 354
reading pixels, 347
vs. renderbuffer objects, 328
resolving multisample renderbuffers to textures, 342โ344
state values, 336
TBR GPUs, 345
FBOs (framebuffer objects), attachments
renderbuffer objects, 337โ338, 347
Filtering textures. See Texture filtering.
Flat/smooth interpolators, 14, 114
floatBitsToInt
function, 470
floatBitsToUInt
function, 470
Floating-point
numbers. See GL_HALF_FLOAT
data type.
pack and unpack, built-in functions, 471โ472
textures, new features, 12
floor
function, 467
Fog effects. See also Particle systems.
linear fog, creating with a fragment shader, 288โ291
wispy fog, creating with noise, 402โ404
fract
function, 468
Fragment depth, new features, 15
Fragment processing, built-in functions, 483โ484
built-in special variables, 283โ284
fragment depth, overriding, 284
front-facing fragments, identifying, 284
input variables, 8
inputs, 8
maximum uniform blocks, querying, 91
MRTs (multiple render targets), minimum/maximum number of, 285
offsets, minimum/maximum, 285
precision qualifiers, 285
samplers, 8
shader inputs, minimum/maximum number of, 284
shader program, 8
Shading Language version, specifying, 9
texture coordinates for point sprites, 284
texture image units, minimum/maximum number of, 285
uniforms, 8
vec4
uniform entries, minimum/maximum number of, 285
window coordinates of current fragment, 283โ284
Fragment shaders, fixed-function techniques
combining texture maps, 286โ287
pipeline description, 280โ282
transparent fragments, 291โ293
Fragments
blending pixel colors, 311โ314
centroid sampling, 316
color depth, simulating, 314
depth, overriding, 284
dithering, 314
front-facing, identifying, 284
MRTs (multiple render targets), 320โ324
multi-sampled anti-aliasing, 314โ316
pixel pack buffer objects, 320
pixels, reading and writing, 316โ320
rendered images, saving, 316โ320
sample coverage masks, 315
window coordinates of, 283โ284
back, 298
depth of, 298
double buffering, example, 41
front, 298
requesting, 299
size of, 298
types of, 298. See also specific types.
Fragments, tests
depth buffer test, 311
stencil buffer test, 305โ311
test enable tokens, 304
Framebuffer invalidation hints, 17, 344โ345
Framebuffer objects (FBOs). See FBOs (framebuffer objects).
Front buffers, 298
Frustrum, 7
Full integer support, new features, 14
Functions. See also Built-in functions; ES Framework API; specific functions.
description, 106
passing parameters to, 106
recursion, 106
fwidth
function, 484
Gamma-correct rendering, new features, 11, 254. See also sRGB textures.
Geometric built-in functions, 472โ473
Geometry, new features, 15. See also Primitives.
Geometry instancing, 169โ172
GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
, 77
glActiveTexture
function, 256
GL_ACTIVE_UNIFORM_ BLOCK_MAX_LENGTH
, 77
GL_ACTIVE_UNIFORM_BLOCKS
, 77
GL_ACTIVE_UNIFORM_MAX_LENGTH
, 77
GL_ACTIVE_UNIFORMS
, 77
GL_ARRAY_BUFFER
token, 140โ141
GL_ATTACHED_SHADERS
, 77
glAttachShader
function, 75
glBeginQuery
command, 184
glBeginTransformFeedback
command, 213
glBindAttribLocation
command, 139
glBindBuffer
command, 142โ143, 212
glBindBufferBase
function, 91, 212
glBindBufferRange
function, 91, 212
glBindRenderbuffer
function, 330โ331
glBindSamplers
function, 274โ275
glBindTextures
function, 231
glBindVertexArray
function, 151
GL_BLEND
token, 304
glBlendColor
function, 313
glBlendEquation
function, 313โ314
glBlendEquationSeparate
function, 313โ314
glBlendFunc
function, 312โ313
glBlendFuncSeparate
function, 312โ313
glBlitFramebuffer
command, 343โ344
glBufferData
command, 144
GL_BUFFER_SIZE
, 143
glBufferSubData
command, 145
GL_BUFFER_USAGE
, 143
glCheckFramebufferStatus
command, 342
GL_CLAMP_TO_EDGE
mode, 243โ244
glClear
function, 40
glClientWaitSync
function, 359โ360
glColorMask
function, 302
glCompileShader
function, 37, 71โ72
glCompresedTexImage*
functions, 277โ278
glCompresedTexSubImage*
functions, 277โ278
glCompressedTexImage2D
function, 263โ264
glCompressedTexImage3D
function, 263โ264
glCompressedTexSubImage2D
function, 267
GL_COMPRESSED_TEXTURE_FORMATS
, 265
glCopyBufferSubData
function, 159โ160
glCopyTexImage2D
function, 270โ272
glCopyTexSubImage2D
function, 270โ272
glCopyTexSubImage3D
function, 270โ272
glCreateProgram
function, 74โ75
glCreateShader
function, 36โ37, 70โ71
glCullFace
command, 181
GL_CULL_FACE
state, 181
GL_DECR
operation, 306
GL_DECR_WRAP
operation, 306โ307
glDeleteBuffers
command, 150
glDeleteFramebuffers
command, 346โ347
glDeleteProgram
function, 75
glDeleteQueries
command, 184
glDeleteRenderbuffers
command, 346โ347
glDeleteSamplers
function, 273โ274
glDeleteShader
function, 70โ71
GL_DELETE_STATUS
, 77
glDeleteSync
function, 359
glDeleteTextures
function, 230โ231
glDeleteVertexArrays
command, 154
glDepthFunc
function, 311
glDepthMask
function, 302
gl_DepthRange
uniform type, 190
glDepthRangef
command, 179
gl_DepthRangeParameters
uniform type, 190
glDetachShader
function, 75
glDisableVertexAttribArray
command, 132โ135
GL_DITHER
token, 304
glDrawArrays
function, 40โ41, 165โ168, 341
glDrawArraysInstanced
command, 165โ168, 170โ172
glDrawBuffers
function, 321โ322
glDrawElements
function, 165โ168, 172โ174, 341
glDrawElementsInstanced
command, 165โ168, 170โ172, 172โ174
GL_DYNAMIC_COPY
, 143
GL_DYNAMIC_DRAW
, 143
GL_DYNAMIC_READ
, 143
GL_ELEMENT_ARRAY_BUFFER
token, 140โ141
glEnable
function, 23โ24, 437โ438
glEnableVertexAttribArray
command, 132โ135
glEndQuery
command, 184
glEndTransformFeedback
command, 213
glFenceSync
function, 358
glFinish
command, 358
glFlush
command, 358
glFlushMappedBufferRange
, 158โ159
gl_FragCoord
variable, 283โ284
gl_FragDepth
variable, 284
glFramebufferRenderbuffer
command, 337โ338
glFramebufferTexture2D
command, 338โ339
glFramebufferTextureLayer
command, 339โ341
glFrontFace
command, 180
gl_FrontFacing
variable, 190, 284
glFrustrum
function, see esFrustrum
function
glGenBuffers
command, 142โ143
glGenerateMipmap
function, 242
glGenFramebuffers
function, 330
glGenQueries
command, 184
glGenRenderbuffers
function, 329โ330
glGenSamplers
function, 273
glGenTextures
function, 230
glGenVertexArrays
function, 151
glGetActiveAttrib
command, 136โ137
glGetActiveAttrib
function, 93
glGetActiveUniform
function, 81โ82
glGetActiveUniform*
functions, 81โ82
glGetActiveUniformBlockiv
function, 89โ90
glGetActiveUniformBlockName
function, 89โ90
glGetActiveUniformsiv
function, 82, 87โ88
glGetAttachedShaders
function, 438
glGetAttribLocation
command, 140
glGetBooleanv
function, 423
glGetBufferParameter*
functions, 444
glGetBufferPointerv
function, 444โ446
glGetFloatv
function, 423
glGetFramebuffer AttachmentParameteriv
function, 445โ446
glGetInteger*
functions, 423
glGetInteger64v
function, 92
glGetIntegerv
command, 91, 214, 265
glGetProgramBinary
function, 94
glGetProgramiv
function
checking link status, 76
largest uniform name, getting, 81
number of active vertex attributes, querying, 137โ140
program compatibility, checking, 95
glGetQueryiv
function, 442โ443
glGetQueryObjectuiv
function, 185, 213, 443
glGetRenderbufferParameteriv
function, 445โ446
glGetSamplerParameter
* functions, 442
glGetShaderInfoLog
function, 72โ73
glGetShaderiv
function, 72
glGetShaderPrecisionFormat
function, 439โ440
glGetShaderSource
function, 439
glGetString*
functions, 421โ422
glGetSynciv
function, 443
glGetTexParameter*
functions, 441โ442
glGetUniform*
functions, 439
glGetUniformBlockIndex
function, 89
glGetUniformLocation
function, 83
glGetVertexAttrib*
functions, 440โ441
16-bit floating-point numbers, 458โ459
converting float to half-float, 459โ461
GL_INCR
operation, 306
GL_INCR_WRAP
operation, 306โ307
GL_INFO_LOG_LENGTH
, 77
gl_InstanceID
variable, 171โ172, 189
GL_INTERLEAVED_ATTRIBS
, 77
glInvalidateFramebuffer
command, 345โ346
glInvalidateSubFramebuffer
command, 345โ346
GL_INVALID_ENUM
code, 23
GL_INVALID_OPERATION
code, 23
GL_INVALID_VALUE
code, 23
GL_INVERT
operation, 307
glIs*
functions, 436
GL_KEEP
operation, 307
GL_LINE_LOOP
, 163
GL_LINES
, 163
GL_LINES
mode, 213
GL_LINE_STRIP
, 163
glLineWidth
API call, 164
glLinkProgram
command, 212
glLinkProgram
function, 75โ76
GL_LINK_STATUS
, 95
glMapBufferRange
command, 155โ157
gl_MaxCombinedTextureImageUnits
constant, 190
GL_MAX_COMBINED_UNIFORM_BLOCKS
, 91
gl_MaxDrawBuffers
constant, 285
gl_MaxFragmentInputVectors
constant, 284
GL_MAX_FRAGMENT_UNIFORM_BLOCKS
, 91
GL_MAX_FRAGMENT_UNIFORM_VECTORS
, 109
gl_MaxFragmentUniformVectors
constant, 285
gl_MaxFragmentUniformVectors
variable, 109
gl_MaxProgramTexelOffset
constant, 285
gl_MaxTextureImageUnits
constant, 285
GL_MAX_UNIFORM_BLOCK_SIZE
, 92
gl_MaxVertexAttribs
constant, 190
gl_MaxVertexAttribs
variable, 112
GL_MAX_VERTEX_ATTRIBS
variable, 112
GL_MAX_VERTEX_OUTPUT_COMPONENTS
variable, 113
gl_MaxVertexOutputVectors
constant, 190
gl_MaxVertexOutputVectors
variable, 113
gl_MaxVertexTextureImageUnits
constant, 190
GL_MAX_VERTEX_TEXTURE_UNITS
, 213
GL_MAX_VERTEX_UNIFORM_BLOCKS
, 91
GL_MAX_VERTEX_UNIFORM_VECTORS
, 109
gl_MaxVertexUniformVectors
constant, 190, 193โ196
gl_MaxVertexUniformVectors
variable, 109
gl_MinProgramTexelOffset
constant, 285
GL_MIRRORED_REPEAT
mode, 243โ244
GL_NO_ERROR
code, 23
GL_OUT_OF_MEMORY
code, 23
glPixelStorei
function, 235
GL_PIXEL_UNPACK_BUFFER
, 277โ278
gl_PointCoord
variable, 164โ165, 284
GL_POINTS
mode, 164โ165, 213
gl_PointSize
variable, 164, 190
glPolygonOffset
command, 182โ183
gl_Position
variable, 190
glProgramBinary
function, 94
GL_PROGRAM_BINARY_RETRIEVABLE_HINT
, 77
GL_RASTERIZER_DISCARD
, 214
glReadBuffer
function, 269โ270
glReadPixels
function, 316โ320, 346โ347
GL_REFLECTION_MAP
mode, 206
glReleaseShaderCompiler
function, 93
glRenderbufferStorage
function, 331โ332
glRenderbufferStorageMultisample
function, 331โ332
GL_REPLACE
operation, 306
GL_SAMPLE_ALPHA_TO_COVERAGE
token, 304
glSampleCoverage
function, 315โ316
GL_SAMPLE_COVERAGE
token, 304
GL_SEPARATE_ATTRIBS
, 77
glShaderSource
function, 37, 71
GL_SPHERE_MAP
mode, 206
GL_STATIC_COPY
, 143
GL_STATIC_DRAW
, 143
GL_STATIC_READ
, 143
glStencilFunc
function, 305โ311
glStencilFuncSeparate
function, 305โ306
glStencilMask
function, 302โ303
glStencilMaskSeparate
function, 303
glStencilOp
function, 306โ311
glStencilOpSeparate
function, 306โ307
GL_STENCIL_TEST
token, 304
GL_STREAM_COPY
, 144
GL_STREAM_DRAW
, 144
GL_STREAM_READ
, 144
glTexImage*
functions, 277โ278
glTexImage2D
function, 231โ234
glTexImage3D
function, 260โ262
glTexParameter*
commands
API overhead, 273
setting minification/magnification filtering modes, 236, 239โ240
texture coordinate wrapping, 243
texture detail level, setting, 245
glTexStorage2D
function, 276โ277
glTexStorage3D
function, 276โ277
glTexSubImage*
functions, 277โ278
glTexSubImage2D
function, 266โ267
glTexSubImage3D
function, 267โ269
GL_TEXTURE_BASE_LEVEL
parameter, 245
GL_TEXTURE_COMPARE_FUNC
parameter, 245โ246
GL_TEXTURE_COMPARE_MODE
parameter, 245โ246
GL_TEXTURE_MAX_LOD
parameter, 245
GL_TEXTURE_MIN_LOD
parameter, 245
GL_TEXTURE_SWIZZLE_A
parameter, 244โ245
GL_TEXTURE_SWIZZLE_B
parameter, 244โ245
GL_TEXTURE_SWIZZLE_G
parameter, 244โ245
GL_TEXTURE_SWIZZLE_R
parameter, 244โ245
GL_TRANSFORM_FEEDBACK_VARYINGS
, 77
GL_TRANSFORM_FEEDBACK_BUFFER_MODE
, 77
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
, 213
GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
, 77
glTransformFeedbackVaryings
command, 212
GL_TRIANGLES
, 162
GL_TRIANGLES
mode, 213
GL_TRIANGLE_STRIP
, 162
GL_UNIFORM_BLOCK_ACTIVE_ NUMBER_INDICES
, 90
GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS
, 90
GL_UNIFORM_BLOCK_BINDING
, 90
glUniformBlockBinding
function, 90โ91
GL_UNIFORM_BLOCK_DATA_SIZE
, 90
GL_UNIFORM_BLOCK_NAME_LENGTH
, 90
GL_UNIFORM_BLOCK_REFERENCED_ BY_VERTEX_SHADER
, 90
GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
, 90
glUnmapBuffer
command, 156โ157
gluPerspective
function, see esPerspective
function
glValidateProgram
function, 78
GL_VALIDATE_STATUS
, 77
glVertexAttrib*
commands, 126
glVertexAttribDivisor
command, 170โ172
glVertexAttribPointer
function, 40, 131โ132
gl_VertexID
variable, 189
glViewport
command, 39, 178โ179
GLvoid
data type, 21
glWaitSync
function, 360
GL_ZERO
operation, 306
greaterThan
function, 475
greaterThanEqual
function, 475
Guard band region, 177
back buffer, displaying, 41
code framework, 28
color buffer, clearing, 39โ40
double buffering, 41
OpenGL ES 3.0 framework, 34โ35
transforming vertices, 35โ36
compiling and loading, 36โ38
if-then-else tests. See Control flow statements.
Images
dimensions, specifying, 331
format, specifying, 331
Images, postprocessing
render-to-texture setup, 387
Immutable textures, 13, 276โ277
in
qualifier, 106
Include files, EGL, 20
Initializing
arrays, 104
buffer objects, 145
scalar data types, 100
structures, 103
vector data types, 100
vertex array objects, 144
inout
qualifier, 106
Input variables, fragment shader, 8
Instance ID, new features, 15
Instanced rendering, new features, 15
intBitsToFloat
function, 470
Integer texture formats, 250โ252
Integer textures, new features, 12
Interpolation qualifiers
centroid sampling, 115
default behavior, 114
flat shading, 114
smooth shading, 114
Interpolators
definition, 113
inverse
function, 474
inversesqrt
function, 467
isinf
function, 470
isnan
function, 470
JDK (Java SE Development Kit) 7, 451
Keywords
centroid
, 115
Latitude-longitude maps, example, 205โ206
Layout qualifiers, 14, 109โ110
length
function, 473
lessThan
function, 475
lessThanEqual
function, 475
Libraries, EGL, 20
Light projection matrix, 392โ393
Lighting
Lighting, per fragment
Lines
clipping, 177
width, specifying, 164
Linking shaders, example, 38โ39
Loading
log
function, 466
log2
function, 467
Loops. See Control flow statements.
Magnification filtering mode, 236, 238โ241
main
function, vertex shader, 6โ7
Mandatory online compiler, new features, 14
Mapping, texture formats to colors, 257
Mapping buffer objects
changing screen resolution, 157
data storage pointer, getting, 155โ156
flushing mapped buffers, 158โ159
Matrices
non-square, new features, 14
projective texturing, 392โ393
Matrix built-in functions, 474
Matrix construction, 101
Matrix transformations, example, 196โ199
matrixCompMult
function, 474
max
function, 468
mediump
keyword, 120, 192โ193
Meshes, connecting, 172
min
function, 468
Min/max functions, new features, 17
Minification filtering mode, 236, 238โ241
automatic generation, 242
detail levels, specifying, 245
mix
function, 469
mod
function, 468
Model matrix, example, 197โ198
Motion blur effects. See Rendering, to textures.
MRTs (multiple render targets)
in fragment shaders, 285
new features, 17
overview, 320
specifying color attachments, 321โ322
Multi-sampled anti-aliasing, 314โ316
Multisample renderbuffers, 17, 333
Naming conventions, 102
Nearest sampling, 237
buffer object to buffer object copies, 16
buffer subrange mapping, 16
pixel buffer objects, 16
sampler objects, 16
sync objects, 16
uniform buffer objects, 16
vertex array objects, 16
New features, framebuffer
blend equations, 17
framebuffer invalidation hints, 17
min/max functions, 17
MRTs (multiple render targets), 17
multisample renderbuffers, 17
off-screen rendering, 17
New features, geometry
Boolean occlusion queries, 15
instanced rendering, 15
new vertex formats, 15
primitive restart, 15
transform feedback, 15
New features, shaders
built-in functions, 15
centroid sampling, 14
flat/smooth interpolators, 14
fragment depth, 15
full integer support, 14
instance ID, 15
layout qualifiers, 14
mandatory online compiler, 14
non-square matrices, 14
relaxed restrictions, 15
uniform blocks, 14
vertex ID, 15
New features, texturing
2D texture arrays, 11
3D textures, 12
depth textures, 12
ETC/EAC texture compression, 12
floating-point textures, 12
gamma-correct rendering, 11
immutable textures, 13
increased minimum sizes, 13
integer textures, 12
NPOT (non-power-of-2) textures, 13
seamless cubemap filtering, 12, 241
shadow comparisons, 12
sRGB textures and framebuffers, 11
texture LOD (level of detail) features, 13
texture swizzles, 13
vendor-specific compressed texture formats, 12
New features, vendor-specific compressed texture formats, 12
New vertex formats, new features, 15
Noise, 3D texture
example, 397
water wave simulation, 404
noise3D
function, 401
Non-square matrices, new features, 14
normalize
function, 473
Normalized texture formats, 247โ248
not
function, 475
notEqual
function, 475
NPOT (non-power-of-2) textures, new features, 13
Off-screen rendering, new features, 17
Offsetting polygons, 181โ183
OpenGL ES 1.0, specifications, 2
OpenGL ES 1.1
fixed-function vertex pipeline, 215โ223
specifications, 2
OpenGL ES 2.0, specifications, 2โ3
OpenGL ES 3.0
emulating. See Emulating OpenGL ES 3.0.
implementations, querying, 421โ422
new features. See New features.
platforms. See Emulating OpenGL ES 3.0.
OpenGL ES 3.0, graphics pipeline. See also specific components.
diagram, 4
per-fragment operations, 9โ11
primitive assembly, 7
rasterization, 7
OpenGL ES 3.0 Emulator, 447โ449. See also Emulating OpenGL ES 3.0.
OpenGL ES Shading Language 3.0, specifications, 4
out
qualifier, 106
outerProduct
function, 474
Overlapping polygons, 181โ183
packed
qualifier, 110
packHalf2x16
function, 472
Packing
packSnorm2x16
function, 471
point sprites, 374
rendering algorithm, 381
rendering particles, 385โ386
transform feedback, 380, 381โ385
attributes, 57
description, 56
errors, 58
PCF (percentage closest filtering), 245โ246, 414
Per fragment lighting
Per-fragment operations
blending, 10
depth test, 10
dithering, 10
scissor test, 10
stencil test, 10
Performance
FBOs (framebuffer objects), 354
primitives, drawing, 172โ174
vertex attributes, storing, 131โ135
Perspective division, 178
Pixel buffer objects
new features, 16
pixel pack buffer objects, 320
pixel unpack buffer objects, 277โ278
Pixel buffers (pbuffers)
attributes, 57
description, 56
errors, 59
Pixel pack buffer objects, 320
Pixel unpack buffer objects, 277โ278
Pixels
copying in framebuffer objects, 342โ344
in fragments, reading and writing, 316โ320
reading in framebuffer objects, 347
storage options, 236
texels (texture pixels), 226โ227
Point light, example, 202
Point sampling, 237
Point sprites
clipping, 177
position, 164
radius, 164
texture coordinates for, 284
Point sprites in particle systems, 374
Polygons
joins, smoothing (example), 207โ211
Position, point sprites, 164
Postprocessing effects. See Rendering, to textures.
pow
function, 466
PowerVR Insider SDK v 3.2+, 448
PowerVR OpenGL ES 3.0 Emulator, 449โ450
Precision qualifiers
default precision, 120
vertex shaders, 119โ120, 192โ193
Preprocessor directives. See also specific directives.
Primitive assembly
culling primitives, 7
perspective division, 178
view frustrum, 7
viewport transformation, 178โ179
Primitive assembly, coordinate systems
guard band region, 177
overview, 175
Primitive restart, 15, 168โ169
Primitives. See also Geometry, new features.
drawing, 7. See also Rasterization.
types of, 162โ165. See also specific primitives.
Primitives, drawing
geometry instancing, 169โ172
multiple disconnected primitives, 168โ169
multiple primitives, different attributes, 169โ172
Procedural textures
checkerboard example, 405โ407
pros and cons, 404
compatibility check, 95
definition, 94
format, 95
getting, 94
saving, 94
Program objects. See also Shader objects; Shaders.
attached shaders, counting, 77
deleting, 75
deletion status, querying, 77
detaching shaders, 75
making active, 78
validating, 78
Projection matrix, example, 198โ199
definition, 391
light projection matrix, 392โ393
Qualcomm Adreno SDK v3.4+, 447
Qualifiers
column_major
, 110
in
, 106
inout
, 106
out
, 106
packed
, 110
row_major
, 110
shared
, 110
std140
, 110
Queries. See State queries.
radians
function, 465
Radius, point sprites, 164
enabling/disabling, 214
pipeline, 179
Recursion, in functions, 106
reflect
function, 473
Reflective surfaces, 205โ206. See also Environment mapping; Projective texturing; Rendering, to textures.
refract
function, 473
Renderbuffer objects. See also FBOs (framebuffer objects).
attached to framebuffer objects, 337โ338, 347
default values, 331
definition, 327
vs. FBOs (framebuffer objects), 328
image dimensions, specifying, 331
image format, specifying, 331
multisample, 333
state values, 331
vs. textures, 328
Renderbuffers
multisample, new features, 17
Rendering
from eye position with depth texture, 418โ420
gamma-correct, new features, 11
instanced, new features, 15
from light position into depth texture, 415โ418
off-screen area. See Pbuffers (pixel buffers).
on-screen area. See Windows.
rendered images, saving, 316โ320
shadows with depth texture, 414โ420
terrain with vertex texture fetch, 410โ414
Rendering, to off-screen surfaces. See also FBOs (framebuffer objects); Renderbuffer objects.
new features, 17
Rendering, to textures. See also FBOs (framebuffer objects).
uses for, 326
while using the texture object in a fragment shader, 341
Rendering context, creating, 19, 60โ62, 325โ327. See also EGL; FBOs (framebuffer objects).
Rendering surfaces, creating with EGL, 19. See also EGL.
require
behavior, 116
round
function, 468
roundEven
function, 468
row_major
qualifier, 110
Sample coverage masks, 315
Sampler objects, 16, 273โ275
Samplers
definition, 256
fragment shader, 8
querying, 442
vertex shader, 4
Scalar data types
initializing, 100
type conversion, 100
Screen resolution, effect on mapped buffer objects, 157
Seamless cubemap filtering, new features, 12, 241
Shader compiler, 93
Shader objects, 69โ70. See also Program objects; Shaders.
Shaders. See also Fragment shaders; Vertex shaders.
attached to programs, querying, 438โ440
deleting, 70
linking, 70
source, providing, 71
version specification, declaring, 98
Shaders, new features
built-in functions, 15
centroid sampling, 14
flat/smooth interpolators, 14
fragment depth, 15
full integer support, 14
instance ID, 15
layout qualifiers, 14
mandatory online compiler, 14
non-square matrices, 14
relaxed restrictions, 15
uniform blocks, 14
vertex ID, 15
Shading Language version, specifying in fragment shaders, 9
Shadow comparisons, new features, 12
Shadow mapping, 245โ246. See also Projective texturing; Rendering, to textures.
Shared exponent texture formats, 252โ253
shared
qualifier, 110
Shimmering. See Z fighting.
Shiny surfaces, example, 205โ206
sign
function, 467
Signaling sync objects, 359โ360
sin
function, 465
sinh
function, 466
Smoke effects. See Particle systems.
Smooth shading, 114
smoothstep
function, 470
Specifications, OpenGL ES
1.0, 2
1.1, 2
Shading Language 3.0, 4
Sphere maps, example, 205โ206
sqrt
function, 467
Square brackets ([ ]), array subscript operator, 101โ102
sRGB textures, 11, 254. See also Gamma-correct rendering.
Stairstep effects. See Anti-aliasing; Mipmapping.
State management
checking current state, 24
enabling/disabling state, 23โ24
querying state values, 24
application-modifiable queries, 429โ435
asynchronous objects, 442โ443
implementation-dependent limits, 423โ428
nonprogrammable operations control, 436โ438
OpenGL ES 3.0 implementation string queries, 421โ422
samplers, 442
shaders attached to programs, 438โ440
sync objects, 443
vertex buffers, 444
std140
qualifier, 88โ89, 110
Stencil buffer test, 305โ311
Stencil buffers
buffer write masks, 303
fragment operations, 298โ299, 303. See also Fragments, buffers.
sharing, 329
Stencil test, per-fragment operations, 10
step
function, 470
Structures, 103. See also Arrays of structures.
Structures of arrays, 128. See also Arrays.
Surface configurations
available, determining, 46โ47
Swizzles. See Texture swizzles.
Sync objects
new features, 16
querying, 443
Synchronizing rendering, 66โ67
tan
function, 465
tanh
function, 466
Terrain surfaces, 214โ215, 410โ414
Test enable tokens, 304
Tests, fragments
depth buffer test, 311
stencil buffer test, 305โ311
test enable tokens, 304
Texels (texture pixels), 226โ227
texture
built-in function, 257, 260, 478
Texture coordinates
generating, example, 205โ206
nearest sampling, 237
point sampling, 237
seamless cubemap filtering, 241
Texture filtering, mipmapping
automatic generation, 242
detail levels, specifying, 245
Texture formats
mapping to colors, 257
sRGB, 254
unsized, 247
Texture image units, in fragment shaders, 285
Texture LOD (level of detail) features, new features, 13
Texture lookup built-in functions, 476โ482
Texture maps, combining, 286โ287
Texture objects
pixel storage options, 236
Texture pixels (texels), 226โ227
Texture state, querying, 441โ442
accessing vector components, 101
new features, 13
Texture units, specifying min/max number, 190
textureGrad
function, 481
textureGradOffset
function, 481
textureLod
function, 479
textureOffset
function, 480
textureProj
built-in function, 391, 479
textureProjGrad
function, 482
textureProjGradOffset
function, 482
textureProjLod
function, 480
textureProjLodOffset
function, 480
Textures
color components, mapping. See Texture swizzles.
combining texture maps, 286โ287
compression formats, 264โ265
copying from the color buffer, 269โ273
vs. renderbuffer objects, 328
textureSize
function, 478
Texturing
depth texture compare, 245โ246
fetching from a texture map, 256
PCF (percentage closest filtering), 245โ246
pixel unpack buffer objects, 277โ278
samplers, 256
texels (texture pixels), 226โ227
volume textures. See 3D textures.
Texturing, 2D texture arrays
overview, 230
Texturing, 2D textures
attached to framebuffer objects, 338โ339
base formats, 227
Texturing, 3D textures
attached to framebuffer objects, 339โ340
overview, 229
Texturing, cubemap textures
environment mapping, 228โ229
Texturing, new features
2D texture arrays, 11
3D textures, 12
depth textures, 12
ETC/EAC texture compression, 12
floating-point textures, 12
gamma-correct rendering, 11
immutable textures, 13
increased minimum sizes, 13
integer textures, 12
NPOT (non-power-of-2) textures, 13
seamless cubemap filtering, 12, 241
shadow comparisons, 12
sRGB textures and framebuffers, 11
texture LOD (level of detail) features, 13
texture swizzles, 13
vendor-specific compressed texture formats, 12
Texturing, texture objects
binding, 231
creating, 230
minification/magnification filtering modes, setting, 236
pixel storage options, 236
3D textures
attached to framebuffer objects, 339โ340
new features, 12
overview, 229
3D textures, noise
water wave simulation, 404
Transform feedback
new features, 15
in particle systems, 380โ385
vertex shader, 5
Transformation functions, 490โ494
Transforming vertices, example, 35โ36
Transparent fragments, 291โ293
transpose
function, 474
Triangle fans, drawing, 162โ163
Triangle strips
generating degenerate triangles, 15
primitive restart, 15
winding order, 174
Triangles
clipping, 177
Trigonometry built-in functions, 465โ466
trunc
function, 467
2D texture arrays
new features, 11
overview, 230
2D textures
attached to framebuffer objects, 338โ339
base formats, 227
noise, 402
Type conversion, 100
Ubuntu Linux, emulating OpenGL ES 3.0, 449โ450
uintBitsToFloat
function, 470
Uniform block indexes, associating with binding points, 90
Uniform blocks
active uniforms, counting, 90
last buffer binding point, getting, 90
maximum for all shaders, querying, 91
maximum per shader, querying, 91
minimum supported number, 91
minimum total buffer object size, 90
name length, getting, 90
new features, 14
references to, querying, 90
Uniform buffer objects. See also Buffer objects.
available storage, querying, 92
binding, 91
new features, 16
programming limitations, 91
Uniform names
largest, counting characters, 81
maximum length, querying, 77
Uniform variables. See Uniforms.
active, counting, 77
constant store, 109
first category, 80
fragment shader, 8
indexes, getting, 89
maximum number in vertex shaders, 193โ196
maximum number of, determining, 109
std140
block layout, 88
vertex shader, 4
Unmapping mapped buffer objects, 155โ156
unpackHalf2x16
function, 472
unpackSnorm2x16
function, 471
unpackUnorm2x16
function, 471โ472
Unsized texture formats, 247
Updating, buffer objects, 145
Validating programs, description, 78
Validation status, querying, 77
Variable constructors, 100โ101
Variables, 119โ120. See also specific variables.
Varying variables. See Vertex shaders, output variables.
vec4
uniform entries, in fragment shaders, 285
Vector components
naming conventions, 102
Vector data types
initializing, 100
type conversion, 100
Vector relational built-in functions, 475
Vertex array objects
binding, 151
deleting, 154
initializing, 144
new features, 16
Vertex attribute variables, declaring in vertex shaders, 135โ137
Vertex attributes
minimum number required, 126
Vertex attributes, binding
to attribute variables, 137โ140
querying results of, 140
Vertex attributes, specifying
client vertex arrays, 126โ135
constant vertex attributes, 126
description, 126
Vertex attributes, storing. See also Arrays of structures; Structures of arrays.
constant vertex attributes, 132โ135
data conversions, 132
selecting a data format, 131
Vertex buffer objects. See also Buffer objects.
array buffer objects, 140โ141
binding, 141
creating, 141
element buffer objects, 140โ141
making current, 141
Vertex buffers, querying, 444
Vertex ID, new features, 15
displacement mapping, 214โ215
inputs/outputs, 111โ114, 188โ189. See also specific inputs/outputs.
interpolators, 113
maximum uniform blocks, querying, 91
min/max limits, 190โ192, 193โ196
output variables, 5
precision qualifiers, 119โ120, 192โ193
Shading Language version, specifying, 6
uniforms, maximum number of, 193โ196
vertex normal, computing, 412โ413
Vertex shaders, built-ins
uniform state, 190
Vertex shaders, examples
creating vertex shaders, 35โ36
generating texture coordinates, 205โ206
height value, fetching, 412โ413
latitude-longitude maps, 205โ206
matrix transformations, 196โ199
OpenGL ES 1.1 fixed-function vertex pipeline, 215โ223
point light, 202
polygon joins, smoothing, 207โ211
reflective surfaces, 205โ206
Vertex shaders, overview
example, 6
samplers, 4
shader program, 4
transform feedback, 5
uniforms, 4
vertex shader output variables, 5
Vertex skinning, example, 207โ211
Vertices, transforming (example), 35โ36
View frustrum, 7
View matrix, example, 197โ198
Viewport, setting (example), 39โ40
Viewport transformation, 178โ179
Visual artifacts. See Mipmapping; Z-fighting artifacts.
Waiting for sync objects, 359โ360
warn
behavior, 117
Water surfaces, vertex shaders, 214โ215
Water wave simulation, 404
Winding order, triangle strips, 174
Windowing systems, communicating with, 44โ45
Windows, 34โ35. See also EGL windows.
Windows, emulating OpenGL ES 3.0, 447โ449
Wrapping, texture coordinates, 243โ244