Reputation: 115
I created a window using glutCreateWindow( window_name); How can I get the X window id of this window? Thanks!
Upvotes: 2
Views: 751
Reputation: 119847
GLUT intentionally does not make this information available, in order to maintain maximal windowing system neutrality.
You might be able to work around this restriction by creating a window, then immediately calling glXGetCurrentDrawable()
. This returns a GLXDrawable
. For GLUT windows, this is probably the same as the underlying Xlib Window
. I have tested this on my system and it seems to be working, but YMMW.
Upvotes: 2