SDL_GLProfile(3type)

πŸ’– SDL_GLProfile πŸ’–

okay bestie, welcome to the SDL3 DATATYPES corner of the manual β€” this one's SDL_GLProfile(3type) and it's short but it's mighty 🫢


✨ NAME ✨

SDL_GLProfile β€” the possible values you can set for the SDL_GL_CONTEXT_PROFILE_MASK attribute. that's it, that's the whole vibe. it's a "which flavour of OpenGL are we doing today" kind of situation πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_video.h>

typedef Uint32 SDL_GLProfile;

#define SDL_GL_CONTEXT_PROFILE_CORE           0x0001  /**< OpenGL Core Profile context */
#define SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  0x0002  /**< OpenGL Compatibility Profile context */
#define SDL_GL_CONTEXT_PROFILE_ES             0x0004  /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */

so yeah β€” it's a Uint32 underneath, lowkey just an unsigned integer doing cosplay as a profile selector, and the actual choices are these three #defines right here πŸ‘‘

  • SDL_GL_CONTEXT_PROFILE_CORE = 0x0001 β€” OpenGL Core Profile context πŸŽ€
  • SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002 β€” OpenGL Compatibility Profile context 🌸
  • SDL_GL_CONTEXT_PROFILE_ES = 0x0004 β€” GLX_CONTEXT_ES2_PROFILE_BIT_EXT πŸ¦‹

not me pointing out that the hex values are literally 0x0001, 0x0002 and 0x0004 β€” clean bitflag energy, one bit each, iconic behavior fr fr ✨


πŸ’œ AVAILABILITY πŸ’œ

this datatype has been around since SDL 3.2.0 β€” so it's not some brand new baby, it's been serving for a minute 🌈

ngl, if you're poking at GL context profile masks, make sure your SDL is at least 3.2.0 or this whole thing is giving nothing πŸ’€

anyway bestie, that's the entire page, no cap. go forth and pick your profile 🧚

with love from the Simple Directmedia Layer girlies, SDL 3.4.18, and this lil SDL_GLProfile(3type) page β€” mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from