GLFW in a CWnd

thr3ad wrote on Sunday, January 18, 2009:

Hi Experts,

Is there a way to "open an OpenGL window" without using the glfwOpenWindow function? i.e., is there a way to create set the contents of the window that glfwOpenWindow creates as a CWnd that I can drop on a form in Visual C++ as a custom control?

Many thanks!
Mike

anubus94 wrote on Wednesday, August 12, 2009:

I have a similar question to this. I would like to integrate glfw into a wxPanel in wxwidgets to create a world builder for my game. I can’t seem to find a glfwOpenXXX function in 2.6 that takes a HWND or window handle so that I can render into that rather than a separate window. Is such a feature available in a later version or in the road map? If not, then I guess I can hack the code and create my own function to do this (at least on windows) or just have the render window separate from the controls, which is less than ideal.

Thanks.

elmindreda wrote on Thursday, August 13, 2009:

Like most serious UI toolkits, wxWidgets has built-in support for OpenGL. Therefore, there is no need for GLFW to integrate with it; especially not in platform-dependent ways.

http://docs.wxwidgets.org/stable/wx_wxglcanvas.html

anubus94 wrote on Saturday, August 15, 2009:

Thanks. I found this class too shortly before you posted. I was going to use wxwidgets input anyways, so now the only thing I am lacking is some utility functions like extension support querying and gl procedure lookups, which I was able to copy and paste from your windows-specific source. The current requirements of my project only require the world builder to run on windows, so this is okay for now. I now see why these need the glfw to be initialized as they require a valid gl context.