log-gl-error ( function -- ) (original) (raw)

log-gl-error ( function -- )

Vocabulary
opengl.annotations

Inputs

function a word

Outputs
None

Word description
If the most recent OpenGL call resulted in an error, append it to the gl-error-log.

Notes
Don't call this function directly. Call log-gl-errors to annotate every OpenGL function to automatically log errors.

See also
throw-gl-errors, gl-error, log-gl-errors, clear-gl-error-log, reset-gl-functions

Definition

USING: kernel namespaces opengl sequences ;

IN: opengl.annotations

: log-gl-error ( function -- )
gl-error-code
[ gl-error-log get push ] [ drop ] if* ;