tags:

views:

29

answers:

1

Is there a sane way to create and destroy multiple OpenGL windows in ruby-opengl?

I have code that is working wonderfully using GLUT, that comes with the ruby-opengl package, but it seems to suffer from the (well known?) problem of GLUT not allowing you to trap the window close events without major hacking of the library.

Some googling seems to indicate that the FreeGLUT library has extended GLUT to include a window-close callback, but that isn't exported through the ruby bindings. Preliminary reading of both GLFW and SDL bindings both seem to have no way to switch between windows.

So is there a preferred way of doing this? Perhaps I need to look into a much more heavyweight library like GTK to get this kind of control?

A: 

maybe with ffi opengl? http://github.com/remogatto/ffi-opengl

rogerdpack