mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Fixed extension retrieval for OpenGL ES 3+.
This commit is contained in:
parent
6c7509c942
commit
d311e28038
@ -99,6 +99,8 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
|||||||
- Bugfix: The particles example was not linked against the threading library
|
- Bugfix: The particles example was not linked against the threading library
|
||||||
- Bugfix: The cursor was not positioned over newly created full screen windows
|
- Bugfix: The cursor was not positioned over newly created full screen windows
|
||||||
- Bugfix: The queried cursor position was not always up-to-date
|
- Bugfix: The queried cursor position was not always up-to-date
|
||||||
|
- Bugfix: `glfwExtensionSupported` always failed for OpenGL ES 3.0 and later if
|
||||||
|
the library was compiled for OpenGL ES
|
||||||
- [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] Made content view subclass of `NSOpenGLView`
|
- [Cocoa] Made content view subclass of `NSOpenGLView`
|
||||||
|
@ -588,7 +588,6 @@ GLFWAPI void glfwSwapInterval(int interval)
|
|||||||
|
|
||||||
GLFWAPI int glfwExtensionSupported(const char* extension)
|
GLFWAPI int glfwExtensionSupported(const char* extension)
|
||||||
{
|
{
|
||||||
const GLubyte* extensions;
|
|
||||||
_GLFWwindow* window;
|
_GLFWwindow* window;
|
||||||
|
|
||||||
_GLFW_REQUIRE_INIT_OR_RETURN(GL_FALSE);
|
_GLFW_REQUIRE_INIT_OR_RETURN(GL_FALSE);
|
||||||
@ -606,23 +605,8 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->context.major < 3)
|
|
||||||
{
|
|
||||||
// Check if extension is in the old style OpenGL extensions string
|
|
||||||
|
|
||||||
extensions = glGetString(GL_EXTENSIONS);
|
|
||||||
if (!extensions)
|
|
||||||
{
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
||||||
"Failed to retrieve extension string");
|
|
||||||
return GL_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_glfwStringInExtensionString(extension, extensions))
|
|
||||||
return GL_TRUE;
|
|
||||||
}
|
|
||||||
#if defined(_GLFW_USE_OPENGL)
|
#if defined(_GLFW_USE_OPENGL)
|
||||||
else
|
if (window->context.major >= 3)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
GLint count;
|
GLint count;
|
||||||
@ -645,7 +629,22 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
|
|||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif // _GLFW_USE_OPENGL
|
#endif // _GLFW_USE_OPENGL
|
||||||
|
{
|
||||||
|
// Check if extension is in the old style OpenGL extensions string
|
||||||
|
|
||||||
|
const GLubyte* extensions = glGetString(GL_EXTENSIONS);
|
||||||
|
if (!extensions)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
"Failed to retrieve extension string");
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_glfwStringInExtensionString(extension, extensions))
|
||||||
|
return GL_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if extension is in the platform-specific string
|
// Check if extension is in the platform-specific string
|
||||||
return _glfwPlatformExtensionSupported(extension);
|
return _glfwPlatformExtensionSupported(extension);
|
||||||
|
Loading…
Reference in New Issue
Block a user