20 #ifndef Fl_Gl_Window_H 21 #define Fl_Gl_Window_H 26 class Fl_Gl_Window_Driver;
52 friend class Fl_Gl_Window_Driver;
53 Fl_Gl_Window_Driver *pGlWindowDriver;
61 virtual void draw_overlay();
66 static int can_do(
int,
const int *);
67 int mode(
int,
const int *);
68 static int gl_plugin_linkage();
78 void resize(
int,
int,
int,
int);
81 Fl_Gl_Window_Driver *
gl_driver() {
return pGlWindowDriver;}
107 char valid()
const {
return valid_f_ & 1;}
111 void valid(
char v) {
if (v) valid_f_ |= 1;
else valid_f_ &= 0xfe;}
193 void context(
GLContext,
int destroy_flag = 0);
198 int can_do_overlay();
199 void redraw_overlay();
201 void make_overlay_current();
206 float pixels_per_unit();
216 int pixel_w() {
return int(pixels_per_unit() *
w() + 0.5f); }
226 int pixel_h() {
return int(pixels_per_unit() *
h() + 0.5f); }
244 #endif // Fl_Gl_Window_H
virtual Fl_Gl_Window * as_gl_window()
Returns an Fl_Gl_Window pointer if this widget is an Fl_Gl_Window.
Definition: Fl_Gl_Window.H:204
This widget produces an actual window.
Definition: Fl_Window.H:53
void draw()
Draws the widget.
Definition: Fl_Window.cxx:482
GLContext context() const
Returns a pointer to the GLContext that this window is using.
Definition: Fl_Gl_Window.H:192
int mode(int a)
Set or change the OpenGL capabilites of the window.
Definition: Fl_Gl_Window.H:177
static int can_do(const int *m)
Returns non-zero if the hardware supports the given OpenGL mode.
Definition: Fl_Gl_Window.H:130
Fl_Gl_Window(int X, int Y, int W, int H, const char *l=0)
Creates a new Fl_Gl_Window widget using the given position, size, and label string.
Definition: Fl_Gl_Window.H:240
virtual void resize(int X, int Y, int W, int H)
Changes the size and position of the window.
Definition: Fl_Window.cxx:545
Fl_Mode
visual types and Fl_Gl_Window::mode() (values match Glut)
Definition: Enumerations.H:1192
virtual int handle(int)
Handles the specified event.
Definition: Fl_Window.cxx:561
char valid() const
Is turned off when FLTK creates a new context for this window or when the window resizes, and is turned on after draw() is called.
Definition: Fl_Gl_Window.H:107
virtual void show()
Puts the window on the screen.
Definition: Fl_Window.cxx:533
int pixel_h()
Gives the window height in OpenGL pixels.
Definition: Fl_Gl_Window.H:226
void show(int a, char **b)
Same as Fl_Window::show(int a, char **b)
Definition: Fl_Gl_Window.H:75
int can_do()
Returns non-zero if the hardware supports the current OpenGL mode.
Definition: Fl_Gl_Window.H:132
Definition: Fl_Gl_Choice.H:70
Fl_Gl_Window_Driver * gl_driver()
Returns a pointer to the window's Fl_Gl_Window_Driver object.
Definition: Fl_Gl_Window.H:81
Fl_Gl_Window(int W, int H, const char *l=0)
Creates a new Fl_Gl_Window widget using the given size, and label string.
Definition: Fl_Gl_Window.H:233
void make_current()
Sets things up so that the drawing functions in <FL/fl_draw.H> will go into this window.
Definition: Fl_Window.cxx:521
The Fl_Gl_Window widget sets things up so OpenGL works.
Definition: Fl_Gl_Window.H:51
int mode(const int *a)
Set the OpenGL capabilites of the window using platform-specific data.
Definition: Fl_Gl_Window.H:189
void context_valid(char v)
See char Fl_Gl_Window::context_valid() const.
Definition: Fl_Gl_Window.H:124
virtual void flush()
Forces the window to be drawn, this window is also made current and calls draw(). ...
Definition: Fl_Window.cxx:472
static int can_do(int m)
Returns non-zero if the hardware supports the given OpenGL mode.
Definition: Fl_Gl_Window.H:127
int pixel_w()
Gives the window width in OpenGL pixels.
Definition: Fl_Gl_Window.H:216
Fl_Mode mode() const
Returns the current OpenGL capabilites of the window.
Definition: Fl_Gl_Window.H:136
char context_valid() const
Will only be set if the OpenGL context is created or recreated.
Definition: Fl_Gl_Window.H:120
void valid(char v)
See char Fl_Gl_Window::valid() const.
Definition: Fl_Gl_Window.H:111
virtual void hide()
Removes the window from the screen.
Definition: Fl_Window.cxx:549