mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Merge branch 'master' of ssh://glfw.git.sourceforge.net/gitroot/glfw/glfw
This commit is contained in:
@@ -288,6 +288,12 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (desired->sRGB && !current->sRGB)
|
||||
{
|
||||
// sRGB framebuffer is a hard constraint
|
||||
continue;
|
||||
}
|
||||
|
||||
// Count number of missing buffers
|
||||
{
|
||||
missing = 0;
|
||||
@@ -467,6 +473,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||
fbconfig.auxBuffers = Max(_glfwLibrary.hints.auxBuffers, 0);
|
||||
fbconfig.stereo = _glfwLibrary.hints.stereo ? GL_TRUE : GL_FALSE;
|
||||
fbconfig.samples = Max(_glfwLibrary.hints.samples, 0);
|
||||
fbconfig.sRGB = _glfwLibrary.hints.sRGB ? GL_TRUE : GL_FALSE;
|
||||
|
||||
// Set up desired window config
|
||||
wndconfig.mode = mode;
|
||||
@@ -751,6 +758,9 @@ GLFWAPI void glfwOpenWindowHint(int target, int hint)
|
||||
case GLFW_FSAA_SAMPLES:
|
||||
_glfwLibrary.hints.samples = hint;
|
||||
break;
|
||||
case GLFW_SRGB_CAPABLE:
|
||||
_glfwLibrary.hints.sRGB = hint;
|
||||
break;
|
||||
case GLFW_OPENGL_VERSION_MAJOR:
|
||||
_glfwLibrary.hints.glMajor = hint;
|
||||
break;
|
||||
@@ -1060,6 +1070,8 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param)
|
||||
return window->windowNoResize;
|
||||
case GLFW_FSAA_SAMPLES:
|
||||
return window->samples;
|
||||
case GLFW_SRGB_CAPABLE:
|
||||
return window->sRGB;
|
||||
case GLFW_OPENGL_VERSION_MAJOR:
|
||||
return window->glMajor;
|
||||
case GLFW_OPENGL_VERSION_MINOR:
|
||||
|
||||
Reference in New Issue
Block a user