SDL Wiki

SDL_GLcontextFlag

An enumeration of OpenGL context configuration flags.

Values

SDL_GL_CONTEXT_DEBUG_FLAG

see Remarks

SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG

see Remarks

SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG

see Remarks

SDL_GL_CONTEXT_RESET_ISOLATION_FLAG

see Remarks

Code Examples

SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);

Remarks

This enumeration is used in conjunction with SDL_GL_SetAttribute and SDL_GL_CONTEXT_FLAGS. Multiple flags can be OR'd together.

If you don't know what these values do, you should assume the defaults are already fine and shouldn't use these flags. Not only are they not available on all platforms and GPU drivers, they can also have dramatic consequences for OpenGL functionality and performance, so please research them heavily before putting these flags to use.

SDL_GL_CONTEXT_DEBUG_FLAG

This flag maps to GLX_CONTEXT_DEBUG_BIT_ARB in the GLX_ARB_create_context extension for X11 and WGL_CONTEXT_DEBUG_BIT_ARB in the WGL_ARB_create_context extension for Windows. This flag is currently ignored on other targets that don't support equivalent functionality. This flag is intended to put the GL into a "debug" mode which might offer better developer insights, possibly at a loss of performance (although a given GL implementation may or may not do anything differently in the presence of this flag).

SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG

This flag maps to GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB in the GLX_ARB_create_context extension for X11 and WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB in the WGL_ARB_create_context extension for Windows. This flag is currently ignored on other targets that don't support equivalent functionality. This flag is intended to put the GL into a "forward compatible" mode, which means that no deprecated functionality will be supported, possibly at a gain in performance, and only applies to GL 3.0 and later contexts.

SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG

This flag maps to GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB in the GLX_ARB_create_context_robustness extension for X11 and WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB in the WGL_ARB_create_context_robustness extension for Windows. This flag is currently ignored on other targets that don't support equivalent functionality. This flag is intended to require a GL context that supports the GL_ARB_robustness extension--a mode that offers a few APIs that are safer than the usual defaults (think snprintf() vs sprintf()).

SDL_GL_CONTEXT_RESET_ISOLATION_FLAG

This flag maps to GLX_CONTEXT_RESET_ISOLATION_BIT_ARB in the GLX_ARB_robustness_isolation extension for X11 and WGL_CONTEXT_RESET_ISOLATION_BIT_ARB in the WGL_ARB_robustness_isolation extension for Windows. This flag is currently ignored on other targets that don't support equivalent functionality. This flag is intended to require the GL to make promises about what to do in the face of driver or hardware failure.

SDL_GLattr
SDL_GL_GetAttribute
SDL_GL_SetAttribute

CategoryAPI, CategoryAPIEnum, CategoryVideo


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.