Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace getWindowInfoFromWindow function with user pointer #84

Open
bryphe opened this issue Jan 24, 2019 · 0 comments
Open

Replace getWindowInfoFromWindow function with user pointer #84

bryphe opened this issue Jan 24, 2019 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bryphe
Copy link
Member

bryphe commented Jan 24, 2019

Right now, we use the getWindowInfoFromWindow function to take a raw GLFW pointer to a Window, and get our augmented WindowInfo struct from it.

However, turns out there is a better way - there's a glfwSetWindowUserPointer and glfwGetWindowUserPointer to store app-specific data. We should use this instead, and store a pointer to the WindowInfo struct.

We can then use this to replace the getWindowInfoFromWindow, and remove the sActiveWindows concept entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant