user1519831
user1519831

Reputation: 115

how to get X window id of a window created by glut

I created a window using glutCreateWindow( window_name); How can I get the X window id of this window? Thanks!

Upvotes: 2

Views: 751

Answers (1)

n. m. could be an AI
n. m. could be an AI

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

Related Questions