---
name: "SDL_GLattr"
section: "3"
platform: "linux"
package: "libsdl1.2-dev"
version: "1.2.15+dfsg2-8"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GLattr"
---

# SDL\_GLattr(3)

SDL GL Attributes

## NAME

SDL\_GLattr - SDL GL Attributes

## ATTRIBUTES

- **SDL\_GL\_RED\_SIZE**

  Size of the framebuffer red component, in bits

- **SDL\_GL\_GREEN\_SIZE**

  Size of the framebuffer green component, in bits

- **SDL\_GL\_BLUE\_SIZE**

  Size of the framebuffer blue component, in bits

- **SDL\_GL\_ALPHA\_SIZE**

  Size of the framebuffer alpha component, in bits

- **SDL\_GL\_DOUBLEBUFFER**

  0 or 1, enable or disable double buffering

- **SDL\_GL\_BUFFER\_SIZE**

  Size of the framebuffer, in bits

- **SDL\_GL\_DEPTH\_SIZE**

  Size of the depth buffer, in bits

- **SDL\_GL\_STENCIL\_SIZE**

  Size of the stencil buffer, in bits

- **SDL\_GL\_ACCUM\_RED\_SIZE**

  Size of the accumulation buffer red component, in bits

- **SDL\_GL\_ACCUM\_GREEN\_SIZE**

  Size of the accumulation buffer green component, in bits

- **SDL\_GL\_ACCUM\_BLUE\_SIZE**

  Size of the accumulation buffer blue component, in bits

- **SDL\_GL\_ACCUM\_ALPHA\_SIZE**

  Size of the accumulation buffer alpha component, in bits

## DESCRIPTION

While you can set most OpenGL attributes normally, the attributes list above must be known *before* SDL sets the video mode. These attributes a set and read with **SDL\_GL\_SetAttribute** and **SDL\_GL\_GetAttribute**.

## SEE ALSO

**SDL\_GL\_SetAttribute**, **SDL\_GL\_GetAttribute**
