24#ifndef Fl_Gl_Window_Driver_H
25#define Fl_Gl_Window_Driver_H
27#include <FL/Fl_Gl_Window.H>
31class Fl_Font_Descriptor;
36class Fl_Gl_Window_Driver {
46 static float gl_scale;
50 int mode() {
return pWindow->mode_;}
51 void mode(
int m) { pWindow->mode_ = m;}
52 const int *alist() {
return pWindow->alist;}
53 void alist(
const int *l) { pWindow->alist = l;}
54 void* overlay() {
return pWindow->overlay;}
55 void draw_overlay() {pWindow->draw_overlay();}
57 Fl_Gl_Window_Driver(
Fl_Gl_Window *win) : pWindow(win) {current_prog=0;}
58 virtual ~Fl_Gl_Window_Driver() {}
59 static Fl_Gl_Window_Driver *newGlWindowDriver(
Fl_Gl_Window *w);
60 static Fl_Gl_Window_Driver *global();
61 virtual float pixels_per_unit() {
return 1;}
62 virtual void before_show(
int&) {}
63 virtual void after_show() {}
64 virtual void invalidate();
65 virtual int mode_(
int ,
const int * ) {
return 0;}
66 virtual void make_current_before() {}
67 virtual void make_current_after() {}
68 virtual void swap_buffers() {}
69 virtual void resize(
int ,
int ,
int ) {}
70 virtual char swap_type();
71 virtual void swap_interval(
int) { }
72 virtual int swap_interval()
const {
return -1; }
73 virtual int flush_begin(
char&) {
return 0;}
74 virtual void gl_hide_before(
void *&) {}
75 static Fl_Gl_Choice *find_begin(
int m,
const int *alistp);
81 virtual Fl_Gl_Choice *find(
int ,
const int * ) {
return NULL;}
84 virtual void delete_gl_context(
GLContext) {}
85 virtual void make_overlay(
void* &o);
86 virtual void hide_overlay() {}
87 virtual void make_overlay_current() {}
88 virtual void redraw_overlay() {}
89 virtual int can_do_overlay() {
return 0;}
90 virtual void waitGL() {}
93 virtual void* GetProcAddress(
const char *procName);
94 virtual void draw_string_legacy(
const char* str,
int n);
95 void draw_string_legacy_get_list(
const char* str,
int n);
96 static void draw_string_legacy_glut(
const char* str,
int n);
97 virtual void get_list(Fl_Font_Descriptor*,
int) {}
98 virtual void gl_bitmap_font(Fl_Font_Descriptor *) {}
99 virtual int overlay_color(
Fl_Color) {
return 0;}
100 static void draw_string_with_texture(
const char* str,
int n);
102 virtual char *alpha_mask_for_string(
const char *str,
int n,
int w,
int h,
Fl_Fontsize fs);
103 virtual int genlistsize() {
return 0; }
104 virtual Fl_Font_Descriptor** fontnum_to_fontdescriptor(
int fnum);
105 virtual Fl_RGB_Image* capture_gl_rectangle(
int x,
int y,
int w,
int h);
106 static inline Fl_Gl_Window_Driver* driver(
const Fl_Gl_Window *win) {
return win->pGlWindowDriver;}
109 virtual bool need_scissor() {
return false; }
110 virtual void switch_to_GL1();
111 virtual void switch_back();
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1118
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1090
Definition Fl_Gl_Choice.H:44
The Fl_Gl_Window widget sets things up so OpenGL works.
Definition Fl_Gl_Window.H:56
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition Fl_Image.H:339
This widget produces an actual window.
Definition Fl_Window.H:55
This file defines wrapper functions for OpenGL in FLTK.
void gl_start()
Creates an OpenGL context.
Definition gl_start.cxx:58