2 // "$Id: Fl_Gl_Window.H,v 1.2 2002/12/01 15:38:37 neurosurg Exp $"
4 // OpenGL header file for the Fast Light Tool Kit (FLTK).
6 // Copyright 1998-2002 by Bill Spitzak and others.
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Library General Public License for more details.
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 // Please report all bugs and problems to "fltk-bugs@fltk.org".
25 #ifndef Fl_Gl_Window_H
26 #define Fl_Gl_Window_H
28 #include "Fl_Window.H"
31 typedef void* GLContext; // actually a GLXContext or HGLDC
34 class Fl_Gl_Choice; // structure to hold result of glXChooseVisual
36 class FL_EXPORT Fl_Gl_Window : public Fl_Window {
43 char damage1_; // damage() of back buffer
44 virtual void draw_overlay();
49 friend class _Fl_Gl_Overlay;
51 static int can_do(int, const int *);
52 int mode(int, const int *);
57 void show(int a, char **b) {Fl_Window::show(a,b);}
60 void resize(int,int,int,int);
62 char valid() const {return valid_;}
63 void valid(char v) {valid_ = v;}
66 static int can_do(int m) {return can_do(m,0);}
67 static int can_do(const int *m) {return can_do(0, m);}
68 int can_do() {return can_do(mode_,alist);}
69 Fl_Mode mode() const {return (Fl_Mode)mode_;}
70 int mode(int a) {return mode(a,0);}
71 int mode(const int *a) {return mode(0, a);}
73 void* context() const {return context_;}
74 void context(void*, int destroy_flag = 0);
80 void redraw_overlay();
82 void make_overlay_current();
85 Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();}
86 Fl_Gl_Window(int X, int Y, int W, int H, const char *l=0)
87 : Fl_Window(X,Y,W,H,l) {init();}
93 // End of "$Id: Fl_Gl_Window.H,v 1.2 2002/12/01 15:38:37 neurosurg Exp $".