mirror of
https://github.com/glfw/glfw.git
synced 2026-02-20 22:23:12 +01:00
Removed glfwGetGLVersion, added GLFW_OPENGL_REVISION.
This commit is contained in:
32
src/opengl.c
32
src/opengl.c
@@ -556,38 +556,6 @@ GLFWAPI void* glfwGetProcAddress(const char* procname)
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Returns the OpenGL version
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwGetGLVersion(int* major, int* minor, int* rev)
|
||||
{
|
||||
_GLFWwindow* window;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
window = _glfwLibrary.currentWindow;
|
||||
if (!window)
|
||||
{
|
||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (major != NULL)
|
||||
*major = window->glMajor;
|
||||
|
||||
if (minor != NULL)
|
||||
*minor = window->glMinor;
|
||||
|
||||
if (rev != NULL)
|
||||
*rev = window->glRevision;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Copies the specified OpenGL state categories from src to dst
|
||||
//========================================================================
|
||||
|
||||
@@ -777,6 +777,8 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
|
||||
return window->glMajor;
|
||||
case GLFW_OPENGL_VERSION_MINOR:
|
||||
return window->glMinor;
|
||||
case GLFW_OPENGL_REVISION:
|
||||
return window->glRevision;
|
||||
case GLFW_OPENGL_FORWARD_COMPAT:
|
||||
return window->glForward;
|
||||
case GLFW_OPENGL_DEBUG_CONTEXT:
|
||||
|
||||
Reference in New Issue
Block a user