I create 3 windows by X11. The second window is on the top of The first one and the third window is on top of the second one. When I call glXMakeCurrent(…) for the first one, It crashes and say “Bad Match”.
Do the three windows use the only one rendering context or individual rendering context?
I have tried in both ways, but it still crashes. What is possible reason to cause this crash?
Would any people tell me some suggestions? Thanks a lot.
what do you mean with a window on the top of another ?
If I’m not wrong, a context is available for only one window. Also I advise you sharing the same display for all the windows.
Thanks, Jide. I mean that the third window is drawn on the second one and the second one is drawn on the first one. The seond one is a child window of the first one and the third window is a child window of the second one. The three windows did share the same screen. I checked the parameters of glXMakeCurrent(), It looks OK. But it crashes.
I never done such things. So my advises might be wrong…
Try to create your first window like you already done (from the new post you made), then your children using new display connections, new visuals, new contexts. Also for swapping buffers, use the matching arguments regarding each window.
I don’t know how the loop and interactivity will be now, they all depend on display, contexts, windows and such.
hope that helps (a bit).
i don’t think the problem is in the stacking order.
first you should try to get it running with only
one window. if that works, you can create a
subwindow. don’t use XCreateSimpleWindow, instead
use XCreateWindow with the same colormap, visual
etc. as the main win.
Hi, Jide and RididBody. Got your suggestions and Make it work now even though I need do more works. Thx a lot.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.