8000 Check if GLFW has been initialized · Issue #2036 · glfw/glfw · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Check if GLFW has been initialized #2036
Open
@mlivesu

Description

@mlivesu

Hi,
I maintain a library that exposes rendering facilities internally implemented with GLFW. I'd like to handle the calls to glfwInit() and glfwTerminate() directly from within the library, but since there are multiple entry points it would be necessary to know if the environment had already been initialized or not.

I've seen that internally these macros implement similar checks
_GLFW_REQUIRE_INIT()
_GLFW_REQUIRE_INIT_OR_RETURN(NULL)
but they are not accessible from outside GLFW and I could not find an alternative public call in the API.

A similar question was posted long time ago here, but I am not aware of any improvement to this end. Do you think it would be possible to add a boolean function like glfwIsInitialized()? It is true that one could obtain the desired effect by externally storing the GLFW state in an external boolean variable, but in my specific case I'd rather avoid it because the library does not maintain an internal state.

Thanks!

Metadata

Metadata

Assignees

Labels

enhancementFeature suggestions and PRs

Type

No type

Projects

Status

Quick, Isolated and Approved

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0