OpenGL es1.1.12 Chapter 2 2.5

Source: Internet
Author: User

(Draft only, not sorted)

2.5 GL error message

GL can only detect part of the error conditions. This is because in many error detection cases, it will adversely affect the error-free program.

Command for getting error information:

Enum geterror (void );

Each detected error is assigned a numerical code. When an error occurs, an identifier is set and the encoding is recorded. If another error occurs, the encoding of the record is not affected. When the geterror function is called, the encoding is returned and the identifier is cleared. This encoding can be recorded for subsequent errors. If no _ error is returned when geterror is called, it means that no error occurs after the first call (or after GL initialization ).

Multiple ID pairs are used to allow distribution. In this case, until all non-no_error results are returned, otherwise, after geterror is called, subsequent calls return non-0 values of unique code pairs (in undefined order ). If no more non-no_error occurs, all the identifiers are enclosed. This mechanism requires positive bit to identify the pair value and integer. In the initialization status, all identifiers are set to no_error.

Table 2.3 contains all Gl errors. After an error identifier is set, except for an out_of memory error, the results of the GL operation are not defined. In other cases, errors do not affect the GL status or frame cache content. If a generated command returns a value, the value is 0. If the generated command modifies the value through the pointer parameter, these values will not change. These error semantics only apply to GL errors and are not used for system errors such as memory access errors. These actions are only the current actions. The operation of the wrong GL will also change.

Three error generation conditions are hidden in the description of the GL command.

1. When an enumerated value is required and an unacceptable enumerated value is passed, this command returns the invalid_enum error, which also occurs when it points to the pointer parameter of the symbolic constant, if the constant value pointed to by the pointer is unacceptable for the command. If the defined enumerated constant only belongs to the common or common-lite part, if this constant is used in another part, the invali _ Enum error is returned.

2. When the parameter type is defined as sizei, if a negative number is passed, the invalid_value error is returned.


Table 2.3gl Error

3. When executing a GL command, the memory is exhausted and the command is affected, an out_of_memory error may occur.

Conditions for other errors are explicitly described in this document.

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.