OpenGL Context in a child window


has anybody a short example of using OpenGL with Xlib, and drawing to a child window?

When I create just one window, OpenGL works fine, but if I create this Window and within another child-window, I am not able to draw to the child window using opengl?

Any ideas?



You need to use either glXMakeCurrent or glXMakeContextCurrent to make the child window’s context current. And obviously use those functions to switch back to the main window’s context.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.