mirror of
https://github.com/glfw/glfw.git
synced 2025-04-12 03:42:01 +00:00
Added glfwIsInitialized function
This commit is contained in:
parent
955fbd9d26
commit
a2626714ef
@ -2364,6 +2364,22 @@ GLFWAPI const char* glfwGetVersionString(void);
|
||||
*/
|
||||
GLFWAPI int glfwGetError(const char** description);
|
||||
|
||||
/*! @brief Returns the initialization state.
|
||||
* This function returns whether the library has been initialized or not.
|
||||
* @return `GLFW_TRUE` if initialized, or `GLFW_FALSE` otherwise.
|
||||
*
|
||||
* @errors None.
|
||||
*
|
||||
* @remark This function may be called before @ref glfwInit.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread.
|
||||
*
|
||||
* @since Added in version 3.3.6
|
||||
*
|
||||
* @ingroup init
|
||||
*/
|
||||
GLFWAPI int glfwIsInitialized(void);
|
||||
|
||||
/*! @brief Sets the error callback.
|
||||
*
|
||||
* This function sets the error callback, which is called with an error code
|
||||
@ -2408,6 +2424,7 @@ GLFWAPI int glfwGetError(const char** description);
|
||||
*
|
||||
* @ingroup init
|
||||
*/
|
||||
|
||||
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
|
||||
/*! @brief Returns the currently selected platform.
|
||||
|
@ -484,6 +484,11 @@ GLFWAPI int glfwGetError(const char** description)
|
||||
return code;
|
||||
}
|
||||
|
||||
GLFWAPI int glfwIsInitialized(void)
|
||||
{
|
||||
return _glfw.initialized;
|
||||
}
|
||||
|
||||
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
|
||||
{
|
||||
_GLFW_SWAP(GLFWerrorfun, _glfwErrorCallback, cbfun);
|
||||
|
Loading…
Reference in New Issue
Block a user