SDL_GLattr(3)

πŸ’… SDL_GLattr β€” SDL GL Attributes ✨

okay bestie, welcome to the SDL API Reference, page SDL_GLattr(3). this is the list of GL attributes you gotta set before anything else happens, and honestly? it's giving "set it and forget it" but make it OpenGL. 🫢


πŸŽ€ ATTRIBUTES

  • SDL_GL_RED_SIZE β€” how many bits the red component of the framebuffer gets. that's it, that's the whole vibe. ❀️
  • SDL_GL_GREEN_SIZE β€” size of the framebuffer's green component, in bits. πŸ’š
  • SDL_GL_BLUE_SIZE β€” size of the framebuffer's blue component, in bits. πŸ’™
  • SDL_GL_ALPHA_SIZE β€” size of the framebuffer's alpha component, in bits. transparency girlies rise πŸ™ˆ
  • SDL_GL_DOUBLEBUFFER β€” 0 or 1, enable or disable double buffering. lowkey the most important one ngl πŸ”₯
  • SDL_GL_BUFFER_SIZE β€” size of the framebuffer, in bits. the whole thing. iconic.
  • 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's red component, in bits. 🌹
  • SDL_GL_ACCUM_GREEN_SIZE β€” size of the accumulation buffer's green component, in bits. πŸ€
  • SDL_GL_ACCUM_BLUE_SIZE β€” size of the accumulation buffer's blue component, in bits. 🐬
  • SDL_GL_ACCUM_ALPHA_SIZE β€” size of the accumulation buffer's alpha component, in bits. 🫧

🌸 DESCRIPTION

so here's the tea β˜• β€” you can set most OpenGL attributes whenever you want, live your life, no notes. but the attributes in that list up there? those ones have to be known before SDL sets the video mode. like, before. no takebacks, no "oops let me redo that." 🫠

and the way you set and read them is with SDL_GL_SetAttribute and SDL_GL_GetAttribute. that's the whole system, periodt. πŸ’…


πŸ¦‹ SEE ALSO

  • SDL_GL_SetAttribute
  • SDL_GL_GetAttribute

okay that's the page!! πŸ’– this one comes to you from SDL, dated Tue 11 Sep 2001, 23:01 β€” and it lives at SDL_GLattr(3). go set your attributes early, bestie, your future self will thank you πŸŽ€βœ¨

πŸ“¦ where this page comes from