sdlGlGetAttribute function

int sdlGlGetAttribute(
  1. int attr,
  2. Pointer<Int32> value
)

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 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_GL_ResetAttributes \sa SDL_GL_SetAttribute

extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value)

Implementation

int sdlGlGetAttribute(int attr, Pointer<Int32> value) {
  final sdlGlGetAttributeLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 attr, Pointer<Int32> value),
      int Function(int attr, Pointer<Int32> value)>('SDL_GL_GetAttribute');
  return sdlGlGetAttributeLookupFunction(attr, value);
}