mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Fixed refresh of debug context attribute.
This commit is contained in:
parent
e2d6f2761c
commit
ae8393c06e
|
@ -47,6 +47,8 @@ The following dependencies are needed by the examples and test programs:
|
||||||
|
|
||||||
- Added native monitor handle access to native API
|
- Added native monitor handle access to native API
|
||||||
- Added `glfwSetDropCallback` and `GLFWdropfun` for receiving dropped files
|
- Added `glfwSetDropCallback` and `GLFWdropfun` for receiving dropped files
|
||||||
|
- Bugfix: The debug context attribute was set from `GL_ARB_debug_output` even
|
||||||
|
when a debug context had not been requested
|
||||||
- [Cocoa] Added `_GLFW_USE_RETINA` to control whether windows will use the full
|
- [Cocoa] Added `_GLFW_USE_RETINA` to control whether windows will use the full
|
||||||
resolution on Retina displays
|
resolution on Retina displays
|
||||||
- [Cocoa] Bugfix: Using a 1x1 cursor for hidden mode caused some screen
|
- [Cocoa] Bugfix: Using a 1x1 cursor for hidden mode caused some screen
|
||||||
|
|
|
@ -358,7 +358,7 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
||||||
return closest;
|
return closest;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLboolean _glfwRefreshContextAttribs(void)
|
GLboolean _glfwRefreshContextAttribs(const _GLFWwndconfig* wndconfig)
|
||||||
{
|
{
|
||||||
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
|
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
|
||||||
|
|
||||||
|
@ -399,7 +399,8 @@ GLboolean _glfwRefreshContextAttribs(void)
|
||||||
|
|
||||||
if (flags & GL_CONTEXT_FLAG_DEBUG_BIT)
|
if (flags & GL_CONTEXT_FLAG_DEBUG_BIT)
|
||||||
window->glDebug = GL_TRUE;
|
window->glDebug = GL_TRUE;
|
||||||
else if (glfwExtensionSupported("GL_ARB_debug_output"))
|
else if (glfwExtensionSupported("GL_ARB_debug_output") &&
|
||||||
|
wndconfig->glDebug)
|
||||||
{
|
{
|
||||||
// HACK: This is a workaround for older drivers (pre KHR_debug)
|
// HACK: This is a workaround for older drivers (pre KHR_debug)
|
||||||
// not setting the debug bit in the context flags for
|
// not setting the debug bit in the context flags for
|
||||||
|
|
|
@ -728,10 +728,11 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
||||||
unsigned int count);
|
unsigned int count);
|
||||||
|
|
||||||
/*! @brief Retrieves the attributes of the current context.
|
/*! @brief Retrieves the attributes of the current context.
|
||||||
|
* @param[in] wndconfig The desired context attributes.
|
||||||
* @return `GL_TRUE` if successful, or `GL_FALSE` if the context is unusable.
|
* @return `GL_TRUE` if successful, or `GL_FALSE` if the context is unusable.
|
||||||
* @ingroup utility
|
* @ingroup utility
|
||||||
*/
|
*/
|
||||||
GLboolean _glfwRefreshContextAttribs(void);
|
GLboolean _glfwRefreshContextAttribs(const _GLFWwndconfig* wndconfig);
|
||||||
|
|
||||||
/*! @brief Checks whether the desired context attributes are valid.
|
/*! @brief Checks whether the desired context attributes are valid.
|
||||||
* @param[in] wndconfig The context attributes to check.
|
* @param[in] wndconfig The context attributes to check.
|
||||||
|
|
|
@ -232,7 +232,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
|
||||||
glfwMakeContextCurrent((GLFWwindow*) window);
|
glfwMakeContextCurrent((GLFWwindow*) window);
|
||||||
|
|
||||||
// Retrieve the actual (as opposed to requested) context attributes
|
// Retrieve the actual (as opposed to requested) context attributes
|
||||||
if (!_glfwRefreshContextAttribs())
|
if (!_glfwRefreshContextAttribs(&wndconfig))
|
||||||
{
|
{
|
||||||
glfwDestroyWindow((GLFWwindow*) window);
|
glfwDestroyWindow((GLFWwindow*) window);
|
||||||
glfwMakeContextCurrent((GLFWwindow*) previous);
|
glfwMakeContextCurrent((GLFWwindow*) previous);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user