Century Embedded Technologies Nano-X SDK and Developer's Guide | ||
---|---|---|
Prev | Appendix D. GLUT Compatibility | Next |
Fl_Gl_Window | +----Fl_Glut_Window
#include <FL/glut.H>
Each GLUT window is an instance of this class. You may find it useful to manipulate instances directly rather than use GLUT window id's. These may be created without opening the display, and thus can fit better into FLTK's method of creating windows.
The current GLUT window is available in the global variable glut_window.
new Fl_Glut_Window(...) is the same as glutCreateWindow() except it does not show() the window or make the window current.
window->make_current() is the same as glutSetWindow(number). If the window has not had show() called on it yet, some functions that assumme an OpenGL context will not work. If you do show() the window, call make_current() again to set the context.
~Fl_Glut_Window() is the same as glutDestroyWindow() .
Fl_Glut_Window::Fl_Glut_Window(int x, int y, int w, int h, const char *title = 0) Fl_Glut_Window::Fl_Glut_Window(int w, int h, const char *title = 0)
The first constructor takes 4 int arguments to create the window with a preset position and size. The second constructor with 2 arguments will create the window with a preset size, but the window manager will choose the position according to it's own whims.
virtual Fl_Glut_Window::~Fl_Glut_Window()
Destroys the GLUT window.