Aejjee
Aejjee

Reputation: 189

How to pass an HWND as a GLFWwindow*?

I have an HWND that I have been using as the target of OpenGL draw operations, and it is necessary that it be an HWND and not a GLFWwindow for other utilities of the application I'm making. The problem is, I need to load and use shaders on textures that I am rendering text to with FreeType. Unfortunately functions like glfwSetFramebufferSizeCallback() and glfwSwapBuffers() require a GLFWwindow*. Is there any way I can pass a normal HWND as a GLFWwindow?

Upvotes: 0

Views: 499

Answers (1)

Vlad Feinstein
Vlad Feinstein

Reputation: 11311

"When in Rome"...

Just leave your OpenGL window as GLFWwindow.

When (if?) you really need HWND, use glfwGetWin32Window

Upvotes: 1

Related Questions