mirror of
https://github.com/glfw/glfw.git
synced 2024-12-01 14:27:13 +00:00
GLX: Add GLX_ARB_create_context_no_error support
This commit is contained in:
parent
52f7684487
commit
f4ea29cd06
@ -201,6 +201,7 @@ information on what to include when reporting a bug.
|
|||||||
modes (#682)
|
modes (#682)
|
||||||
- [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts
|
- [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts
|
||||||
- [WGL] Added support for `WGL_ARB_create_context_no_error`
|
- [WGL] Added support for `WGL_ARB_create_context_no_error`
|
||||||
|
- [GLX] Added support for `GLX_ARB_create_context_no_error`
|
||||||
- [EGL] Added support for `EGL_KHR_get_all_proc_addresses` (#871)
|
- [EGL] Added support for `EGL_KHR_get_all_proc_addresses` (#871)
|
||||||
- [EGL] Added support for `EGL_KHR_context_flush_control`
|
- [EGL] Added support for `EGL_KHR_context_flush_control`
|
||||||
- [EGL] Bugfix: The test for `EGL_RGB_BUFFER` was invalid
|
- [EGL] Bugfix: The test for `EGL_RGB_BUFFER` was invalid
|
||||||
|
@ -397,6 +397,9 @@ GLFWbool _glfwInitGLX(void)
|
|||||||
if (extensionSupportedGLX("GLX_EXT_create_context_es2_profile"))
|
if (extensionSupportedGLX("GLX_EXT_create_context_es2_profile"))
|
||||||
_glfw.glx.EXT_create_context_es2_profile = GLFW_TRUE;
|
_glfw.glx.EXT_create_context_es2_profile = GLFW_TRUE;
|
||||||
|
|
||||||
|
if (extensionSupportedGLX("GLX_ARB_create_context_no_error"))
|
||||||
|
_glfw.glx.ARB_create_context_no_error = GLFW_TRUE;
|
||||||
|
|
||||||
if (extensionSupportedGLX("GLX_ARB_context_flush_control"))
|
if (extensionSupportedGLX("GLX_ARB_context_flush_control"))
|
||||||
_glfw.glx.ARB_context_flush_control = GLFW_TRUE;
|
_glfw.glx.ARB_context_flush_control = GLFW_TRUE;
|
||||||
|
|
||||||
@ -498,8 +501,6 @@ GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
|
|||||||
|
|
||||||
if (ctxconfig->debug)
|
if (ctxconfig->debug)
|
||||||
flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
|
flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
|
||||||
if (ctxconfig->noerror)
|
|
||||||
flags |= GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
|
|
||||||
|
|
||||||
if (ctxconfig->robustness)
|
if (ctxconfig->robustness)
|
||||||
{
|
{
|
||||||
@ -537,6 +538,14 @@ GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctxconfig->noerror)
|
||||||
|
{
|
||||||
|
if (_glfw.glx.ARB_create_context_no_error)
|
||||||
|
{
|
||||||
|
setGLXattrib(GLX_CONTEXT_OPENGL_NO_ERROR_ARB, GLFW_TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE: Only request an explicitly versioned context when necessary, as
|
// NOTE: Only request an explicitly versioned context when necessary, as
|
||||||
// explicitly requesting version 1.0 does not always return the
|
// explicitly requesting version 1.0 does not always return the
|
||||||
// highest version supported by the driver
|
// highest version supported by the driver
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||||
|
#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
|
||||||
|
|
||||||
typedef XID GLXWindow;
|
typedef XID GLXWindow;
|
||||||
typedef XID GLXDrawable;
|
typedef XID GLXDrawable;
|
||||||
@ -162,6 +163,7 @@ typedef struct _GLFWlibraryGLX
|
|||||||
GLFWbool ARB_create_context_profile;
|
GLFWbool ARB_create_context_profile;
|
||||||
GLFWbool ARB_create_context_robustness;
|
GLFWbool ARB_create_context_robustness;
|
||||||
GLFWbool EXT_create_context_es2_profile;
|
GLFWbool EXT_create_context_es2_profile;
|
||||||
|
GLFWbool ARB_create_context_no_error;
|
||||||
GLFWbool ARB_context_flush_control;
|
GLFWbool ARB_context_flush_control;
|
||||||
|
|
||||||
} _GLFWlibraryGLX;
|
} _GLFWlibraryGLX;
|
||||||
|
Loading…
Reference in New Issue
Block a user