OpenGL-3.0.3.0: A binding for the OpenGL graphics system

Copyright | (c) Sven Panne 2002-2019
License | BSD3
Maintainer | Sven Panne <svenpanne@gmail.com>
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Graphics.Rendering.OpenGL.GLU.Errors

Description

This module corresponds to section 2.5 (GL Errors) of the OpenGL 2.1 specs and chapter 8 (Errors) of the GLU specs, offering a generalized view of errors in GL and GLU.

Synopsis

- data Error = Error ErrorCategory String
- data ErrorCategory
  - = ContextLost
  - | InvalidEnum
  - | InvalidValue
  - | InvalidOperation
  - | InvalidFramebufferOperation
  - | OutOfMemory
  - | StackOverflow
  - | StackUnderflow
  - | TableTooLarge
  - | TesselatorError
  - | NURBSError
- errors :: GettableStateVar [Error]

# Documentation

data Error Source #

GL/GLU errors consist of a general error category and a description of what went wrong.

Constructors

Error ErrorCategory String |

#### Instances

Instances details

Show Error Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GLU.ErrorsInternal Methods showsPrec :: Int -> Error -> ShowS Source # show :: Error -> String Source # showList :: [Error] -> ShowS Source #
Eq Error Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GLU.ErrorsInternal Methods (==) :: Error -> Error -> Bool Source # (/=) :: Error -> Error -> Bool Source #
Ord Error Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GLU.ErrorsInternal Methods compare :: Error -> Error -> Ordering Source # (<) :: Error -> Error -> Bool Source # (<=) :: Error -> Error -> Bool Source # (>) :: Error -> Error -> Bool Source # (>=) :: Error -> Error -> Bool Source # max :: Error -> Error -> Error Source # min :: Error -> Error -> Error Source #

data ErrorCategory Source #

General GL/GLU error categories

Constructors

ContextLost |
InvalidEnum |
InvalidValue |
InvalidOperation |
InvalidFramebufferOperation |
OutOfMemory |
StackOverflow |
StackUnderflow |
TableTooLarge |
TesselatorError |
NURBSError |

#### Instances

Instances details

Show ErrorCategory Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GLU.ErrorsInternal Methods showsPrec :: Int -> ErrorCategory -> ShowS Source # show :: ErrorCategory -> String Source # showList :: [ErrorCategory] -> ShowS Source #
Eq ErrorCategory Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GLU.ErrorsInternal Methods (==) :: ErrorCategory -> ErrorCategory -> Bool Source # (/=) :: ErrorCategory -> ErrorCategory -> Bool Source #
Ord ErrorCategory Source # |

Instance details

Defined in Graphics.Rendering.OpenGL.GLU.ErrorsInternal

Methods

compare :: ErrorCategory -> ErrorCategory -> Ordering Source #

(<) :: ErrorCategory -> ErrorCategory -> Bool Source #

(<=) :: ErrorCategory -> ErrorCategory -> Bool Source #

(>) :: ErrorCategory -> ErrorCategory -> Bool Source #

(>=) :: ErrorCategory -> ErrorCategory -> Bool Source #

max :: ErrorCategory -> ErrorCategory -> ErrorCategory Source #

min :: ErrorCategory -> ErrorCategory -> ErrorCategory Source #

errors :: GettableStateVar [Error] Source #

When an error occurs, it is recorded in this state variable and no further errors are recorded. Reading `errors` returns the currently recorded errors (there may be more than one due to a possibly distributed implementation) and resets the state variable to `[]`, re-enabling the recording of future errors. The value `[]` means that there has been no detectable error since the last time `errors` was read, or since the GL was initialized.