SDL_GL_SwapBuffers(3)

πŸ’– SDL_GL_SwapBuffers πŸ’–

okay bestie, welcome to the SDL API Reference, section 3 β€” the part of the manual where we talk about the OpenGL-adjacent girlypop functions, and today's main character is SDL_GL_SwapBuffers. yes she's short. yes she's iconic. let's go πŸ¦‹


✨ NAME ✨

SDL_GL_SwapBuffers β€” swap OpenGL framebuffers / update the display πŸŽ€


🌸 SYNOPSIS 🌸

#include "SDL.h"

void SDL_GL_SwapBuffers(void );
not me showing you a function that takes literally nothing. void in, void out. she's low maintenance, she's efficient, she ate πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

Swap the OpenGL buffers, if double-buffering is supported. 🌈

that's it. that's the whole description. she swaps the buffers and she updates the display, no cap. if double-buffering isn't supported then... yeah, nothing to swap, bestie 😭 but when it is supported, this is the call that flips your back buffer onto the screen so all your hard work actually becomes visible. main character energy fr fr ✨


πŸ‘‘ SEE ALSO πŸ‘‘

  • SDL_SetVideoMode
  • SDL_GL_SetAttribute

and that's the whole page, bestie 🫢 written under the SDL banner, dated Tue 11 Sep 2001, 23:01 β€” yes, 2001, she's vintage, she's a classic, and she still slays. mwah πŸ’–

πŸ“¦ where this page comes from