OpenGL es1.1.12 Chapter 2 2.1.1

Source: Internet
Author: User

(Draft only, not sorted)

2.1.1 Numerical Calculation

A lot of computing is required during GL running. The implementation of common pro merge le will involve floating point computation and must satisfy the range and accuracy defined in the following "Floating-pointcomputation. The implementation of common pro fi le lite involves fixed-point computing and must meet the range and accuracy defined by "fixed-pointcomputation. However, common pro fi le lite can still use floating point operations.

Floating-point Computation)

This section does not describe how to represent floating-point numbers and how they are calculated. It is just a simple requirement that the floating point must contain enough bits and Its exponent is large enough to generate a unique result with an accuracy within the range of 1/10 ^ 5. The maximum position and orthogonal floating point number must be at least 2 ^ 32. The coordinate ranges of colors and textures must be at least 2 ^ 10. The other amplitude values must be at least 2 ^ 32.

X. 0 = 0. x = 0

1. x = x. 1 = x

X + 0 = 0 + x = x

0 ^ 0 = 1

The requirements for floating point numbers will be further described in the future. Most single-precision floating points meet these requirements.

For the input of the GL command that requires floating-point data, any value indicating floating-point data is legal. For such a GL command, if the input is not a floating point data, the result is undefined, but it must not cause GL interruption or termination. For example, in the IEEE algorithm, a negative 0 or decimal value is used in the GL command, and the result is predictable. If it is a nan value or an infinite value, the result is also undefined. If the X value is not a floating point value, the equations defined above will not be true.

Fixed-pointcomputation)

The fixed point or floating point algorithm can be used in internal computation. The precision of the fixed-point operation must be between (+-) 2 ^-15. The maximum value of the point value used to represent the position and the orthogonal coordinate must be at least 2 ^ 15. The coordinate ranges of colors and textures must be at least 2 ^ 10. Other amplitude values must be at least 2 ^ 15

X. 0 = 0. x = 0

1. x = x. 1 = x

X + 0 = 0 + x = x

0 ^ 0 = 1

Fixed-Point computing may cause a value overflow (overflow ). This result is undefined, but it must not cause GL interruption or termination.

General requirements

Whether fixed-point computing or floating-point computing, the following constraints must be met by all Gl implementations.

For example, the 16.16 annotation indicates that a 32-Bit fixed-point binary complement code has 16 bits. If a vertex is expressed as 16.16, the model view and projection matrix can also be expressed as 16.16. The vertex results of the eye space and NDC space are expressed in 16.16 (see section 2.10), that is, the values are calculated using a finite number of Dynamic Ranges immediately. Therefore, the conversion flow must calculate the eye space and NDC space vertices, it must be accurate. Overflow is unacceptable.

When Division calculation is required, including the implicit division required in vector normalization, the calculation result except 0 is undefined, but it must not cause GL interruption or termination.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.