sdlGlGetAttribute function
Get the actual value for an attribute from the current context.
\param attr an SDL_GLAttr enum value specifying the OpenGL attribute to
get.
\param value a pointer filled in with the current value of attr
.
\returns true on success or false on failure; call SDL_GetError() for more
information.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_GL_ResetAttributes \sa SDL_GL_SetAttribute
extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetAttribute(SDL_GLAttr attr, int *value)
Implementation
bool sdlGlGetAttribute(int attr, Pointer<Int32> value) {
final sdlGlGetAttributeLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Int32 attr, Pointer<Int32> value),
int Function(int attr, Pointer<Int32> value)>('SDL_GL_GetAttribute');
return sdlGlGetAttributeLookupFunction(attr, value) == 1;
}