21.06.2014 Views

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.1. OPENGL FUNDAMENTALS 10<br />

⎧<br />

0.0, E = 0, M = 0<br />

⎪⎨ 2 −14 × M 32 , E = 0, M ≠ 0<br />

V = 2 E−15 × ( 1 + M )<br />

32 , 0 < E < 31<br />

Inf , E = 31, M = 0<br />

⎪⎩<br />

NaN , E = 31, M ≠ 0<br />

If the floating-point number is interpreted as an unsigned 10-bit integer N, then<br />

⌊ N<br />

E =<br />

32⌋<br />

M = N mod 32.<br />

When a floating-point value is converted to an unsigned 10-bit floating-point<br />

representation, finite values are rounded to the closest representable finite value.<br />

While less accurate, implementations are allowed to always round in the direction<br />

of zero. This means negative values are converted to zero. Likewise, finite positive<br />

values greater than 64512 (the maximum finite representable unsigned 10-bit<br />

floating-point value) are converted to 64512. Additionally: negative infinity is converted<br />

to zero; positive infinity is converted to positive infinity; and both positive<br />

and negative NaN are converted to positive NaN .<br />

Any representable unsigned 10-bit floating-point value is legal as input to a<br />

GL command that accepts 10-bit floating-point data. The result of providing a<br />

value that is not a floating-point number (such as Inf or NaN ) to such a command<br />

is unspecified, but must not lead to GL interruption or termination. Providing a<br />

denormalized number to GL must yield predictable results.<br />

Fixed-Point Computation<br />

Vertex attributes may be specified using a 32-bit two’s-complement signed representation<br />

with 16 bits to the right of the binary point (fraction bits).<br />

General Requirements<br />

Some calculations require division. In such cases (including implied divisions<br />

required by vector normalizations), a division by zero produces an unspecified result<br />

but must not lead to GL interruption or termination.<br />

<strong>OpenGL</strong> <strong>4.2</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>April</strong> <strong>27</strong>, <strong>2012</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!