Function sdl2_sys::SDL_GL_SetAttribute
source ยท pub unsafe extern "C" fn SDL_GL_SetAttribute(
attr: SDL_GLattr,
value: c_int,
) -> c_int
Expand description
Set an OpenGL window attribute before window creation.
This function sets the OpenGL attribute attr
to value
. The requested
attributes should be set before creating an OpenGL window. You should use
SDL_GL_GetAttribute() to check the values after creating the OpenGL
context, since the values obtained can differ from the requested ones.
\param attr an SDL_GLattr enum value specifying the OpenGL attribute to set \param value the desired value for the attribute \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_GetAttribute \sa SDL_GL_ResetAttributes