chickadee » sdl2 » gl-attribute

gl-attribute attrprocedure
set! (gl-attribute attr) valuesetter
gl-attribute-set! attr valuesetter

See SDL_GL_GetAttribute and SDL_GL_SetAttribute.

attr must be an OpenGL attribute symbol or corresponding integer.

The value's type depends on attr:

  • If attr is 'context-profile-mask, the value will be an OpenGL profile symbol. (The setter also accepts a corresponding integer.)
  • If attr is 'context-flags, the value will be a list of zero or more OpenGL context flag symbols will be returned. (The setter also accepts an equivalent integer bitfield.)
  • If attr is 'context-release-flags, the value will be an OpenGL context release flag symbol: 'none or 'flush. (This attribute requires SDL 2.0.4 and higher and sdl2 egg version 0.2.0 or higher.)
  • Otherwise, the value is an integer.

The getter and the setters signal an exception of kind (exn sdl2) if an error occurs.