Discussion:
[Foxgui-users] FXGLContext
Julia Dudascik (Contractor)
2016-08-15 14:52:26 UTC
Permalink
I need two diferent OpenGL windows to share the same font. I think the way
to do this is to have them share the same FXGLContext. So I create a
FXGLContext when I create my first window. Then later on when my second
OpenGL window is created, I create another FXGLContext, passing in the one
I want to share with:

FXGLContext *second_one = new FXGLContext(getApp(), scroll_glvisual,
first_gl_context)

where, scroll_gl_visual, is the FXGLVisual from the first OpenGL window.
When I created the first_gl_context, I called "create()" after calling the
constructor. When I call create the FXGLContext for "second_one" (ie
second_one->create()), the code would never come back from the call to
create. So I ran it in the debugger with the FOX code, and what I found is
that when it calls "HWND wnd=CreateWindow(...)" in the FOX file
"FXGLContext.cpp" (the create() function), it never comes back. It just
hangs and I cannot enter the function because of the way it was written. So
I am not sure why it never comes back from this call.

Do you know what would cause this type of behavior? It was able to create
it the first time, so it should work. Am I doing this correctly? I can
create FXGLConext while my application is running? The first one I had
created when the application started.

Please help.

Thanks
Julia

Loading...