2.1. OPENGL ES FUNDAMENTALS 6
Allocation and initialization of GL contexts is also done using these companion
APIs. GL contexts can typically be associated with different default framebuffers,
and some context state is determined at the time this association is performed.
It is possible to use a GL context without a default framebuffer, in which case
a framebuffer object must be used to perform all rendering. This is useful for
applications needing to perform offscreen rendering.
The GL is designed to be run on a range of graphics platforms with varying
graphics capabilities and performance. To accommodate this variety, we specify
ideal behavior instead of actual behavior for certain GL operations. In cases where
deviation from the ideal is allowed, we also specify the rules that an implemen-
tation must obey if it is to approximate the ideal behavior usefully. This allowed
variation in GL behavior implies that two distinct GL implementations may not
agree pixel for pixel when presented with the same input even when run on identi-
cal framebuffer configurations.
Finally, command names, constants, and types are prefixed in the GL (by gl,
GL_, and GL, respectively in C) to reduce name clashes with other packages. The
prefixes are omitted in this document for clarity.
2.1.1 Floating-Point Computation
The GL must perform a number of floating-point operations during the course of
its operation. In some cases, the representation and/or precision of such operations
is defined or limited; by the OpenGL ES Shading Language Specification for op-
erations in shaders, and in some cases implicitly limited by the specified format
of vertex, texture, or renderbuffer data consumed by the GL. Otherwise, the rep-
resentation of such floating-point numbers, and the details of how operations on
them are performed, is not specified. We require simply that numbers’ floating-
point parts contain enough bits and that their exponent fields are large enough so
that individual results of floating-point operations are accurate to about 1 part in
10
5
. The maximum representable magnitude for all floating-point values must be
at least 2
32
. x · 0 = 0 · x = 0 for any non-infinite and non-NaN x. 1 · x = x · 1 = x.
x + 0 = 0 + x = x. 0
0
= 1. (Occasionally further requirements will be specified.)
Most single-precision floating-point formats meet these requirements.
The special values Inf and −Inf encode values with magnitudes too large to
be represented; the special value NaN encodes “Not A Number” values resulting
from undefined arithmetic operations such as
0
0
. Implementations are permitted,
but not required, to support Inf s and NaN s in their floating-point computations.
Any representable floating-point value is legal as input to a GL command that
requires floating-point data. The result of providing a value that is not a floating-
point number to such a command is unspecified, but must not lead to GL interrup-
OpenGL ES 3.0.5 (November 3, 2016)