FLTK 1.4.4

Loading...
Searching...
No Matches
glut.H
1//
2// GLUT emulation header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2023 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17// Emulation of GLUT using fltk.
18
19// GLUT is Copyright (c) Mark J. Kilgard, 1994, 1995, 1996:
20// "This program is freely distributable without licensing fees and is
21// provided without guarantee or warrantee expressed or implied. This
22// program is -not- in the public domain."
23
24// Although I have copied the GLUT API, none of my code is based on
25// any GLUT implementation details and is therefore covered by the LGPL.
26
27// Commented out lines indicate parts of GLUT that are not emulated.
28
29// Notes: as pointed out in STR #3458 the current GLUT window,
30// i.e. the global static variable 'glut_window' can be NULL ...
31// (a) if not (yet) initialized
32// (b) if the current GLUT window is deleted at any time.
33// The FLTK implementation silently ignores function calls if the current
34// window is NULL to avoid dereferencing a NULL pointer. This is obviously
35// compatible with GLUT version 3.7 according to comment #5 on STR #3458.
36// According to the same comment FreeGLUT 3.0 would issue an error message
37// and quit.
38// Albrecht-S, Oct 2023
39
40#ifndef _FL_glut_H_
41# define _FL_glut_H_
42
43# include "gl.h"
44
45
46# include "Fl.H"
47# include "Fl_Gl_Window.H"
48
53 class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window {
54 void _init();
55 int mouse_down;
56 protected:
57 void draw() FL_OVERRIDE;
58 void draw_overlay() FL_OVERRIDE;
59 int handle(int) FL_OVERRIDE;
60 public: // so the inline functions work
61 int number;
62 int menu[3];
63 void make_current();
64 void (*display)();
65 void (*overlaydisplay)();
66 void (*reshape)(int w, int h);
67 void (*keyboard)(uchar, int x, int y);
68 void (*mouse)(int b, int state, int x, int y);
69 void (*motion)(int x, int y);
70 void (*passivemotion)(int x, int y);
71 void (*entry)(int);
72 void (*visibility)(int);
73 void (*special)(int, int x, int y);
74 Fl_Glut_Window(int w, int h, const char *t=0);
75 Fl_Glut_Window(int x, int y, int w, int h, const char *t=0);
76 ~Fl_Glut_Window();
77};
78
79 extern FL_EXPORT Fl_Glut_Window *glut_window; // the current window
80 extern FL_EXPORT int glut_menu; // the current menu
81
82// function pointers that are not per-window:
83 extern FL_EXPORT void (*glut_idle_function)();
84 extern FL_EXPORT void (*glut_menustate_function)(int);
85 extern FL_EXPORT void (*glut_menustatus_function)(int,int,int);
86
88
89//# define GLUT_API_VERSION This does not match any version of GLUT exactly...
90
91FL_EXPORT void glutInit(int *argcp, char **argv); // creates first window
92
93FL_EXPORT void glutInitDisplayMode(unsigned int mode);
94// the FL_ symbols have the same value as the GLUT ones:
95# define GLUT_RGB FL_RGB
96# define GLUT_RGBA FL_RGB
97# define GLUT_INDEX FL_INDEX
98# define GLUT_SINGLE FL_SINGLE
99# define GLUT_DOUBLE FL_DOUBLE
100# define GLUT_ACCUM FL_ACCUM
101# define GLUT_ALPHA FL_ALPHA
102# define GLUT_DEPTH FL_DEPTH
103# define GLUT_STENCIL FL_STENCIL
104# define GLUT_MULTISAMPLE FL_MULTISAMPLE
105# define GLUT_STEREO FL_STEREO
106// # define GLUT_LUMINANCE 512
107
108FL_EXPORT void glutInitWindowPosition(int x, int y);
109
110FL_EXPORT void glutInitWindowSize(int w, int h);
111
112FL_EXPORT void glutMainLoop();
113
114FL_EXPORT int glutCreateWindow(char *title);
115FL_EXPORT int glutCreateWindow(const char *title);
116
117FL_EXPORT int glutCreateSubWindow(int win, int x, int y, int width, int height);
118
119FL_EXPORT void glutDestroyWindow(int win);
120
121 inline void glutPostRedisplay() {
122 if (glut_window) glut_window->redraw();
123}
124
125FL_EXPORT void glutPostWindowRedisplay(int win);
126
127FL_EXPORT void glutSwapBuffers();
128
129 inline int glutGetWindow() {
130 return glut_window ? glut_window->number : 0;
131}
132
133FL_EXPORT void glutSetWindow(int win);
134
135 inline void glutSetWindowTitle(char *t) {
136 if (glut_window) glut_window->label(t);
137}
138
139 inline void glutSetIconTitle(char *t) {
140 if (glut_window) glut_window->iconlabel(t);
141}
142
143 inline void glutPositionWindow(int x, int y) {
144 if (glut_window) glut_window->position(x,y);
145}
146
147 inline void glutReshapeWindow(int w, int h) {
148 if (glut_window) glut_window->size(w,h);
149}
150
151 inline void glutPopWindow() {
152 if (glut_window) glut_window->show();
153}
154
155 inline void glutPushWindow() { /* do nothing */ }
156
157 inline void glutIconifyWindow() {
158 if (glut_window) glut_window->iconize();
159}
160
161 inline void glutShowWindow() {
162 if (glut_window) glut_window->show();
163}
164
165 inline void glutHideWindow() {
166 if (glut_window) glut_window->hide();
167}
168
169 inline void glutFullScreen() {
170 if (glut_window) glut_window->fullscreen();
171}
172
173 inline void glutSetCursor(Fl_Cursor cursor) {
174 if (glut_window) glut_window->cursor(cursor);
175}
176
177// notice that the numeric values are different than glut:
178# define GLUT_CURSOR_RIGHT_ARROW ((Fl_Cursor)2)
179# define GLUT_CURSOR_LEFT_ARROW ((Fl_Cursor)67)
180# define GLUT_CURSOR_INFO FL_CURSOR_HAND
181# define GLUT_CURSOR_DESTROY ((Fl_Cursor)45)
182# define GLUT_CURSOR_HELP FL_CURSOR_HELP
183# define GLUT_CURSOR_CYCLE ((Fl_Cursor)26)
184# define GLUT_CURSOR_SPRAY ((Fl_Cursor)63)
185# define GLUT_CURSOR_WAIT FL_CURSOR_WAIT
186# define GLUT_CURSOR_TEXT FL_CURSOR_INSERT
187# define GLUT_CURSOR_CROSSHAIR FL_CURSOR_CROSS
188# define GLUT_CURSOR_UP_DOWN FL_CURSOR_NS
189# define GLUT_CURSOR_LEFT_RIGHT FL_CURSOR_WE
190# define GLUT_CURSOR_TOP_SIDE FL_CURSOR_N
191# define GLUT_CURSOR_BOTTOM_SIDE FL_CURSOR_S
192# define GLUT_CURSOR_LEFT_SIDE FL_CURSOR_W
193# define GLUT_CURSOR_RIGHT_SIDE FL_CURSOR_E
194# define GLUT_CURSOR_TOP_LEFT_CORNER FL_CURSOR_NW
195# define GLUT_CURSOR_TOP_RIGHT_CORNER FL_CURSOR_NE
196# define GLUT_CURSOR_BOTTOM_RIGHT_CORNER FL_CURSOR_SE
197# define GLUT_CURSOR_BOTTOM_LEFT_CORNER FL_CURSOR_SW
198# define GLUT_CURSOR_INHERIT FL_CURSOR_DEFAULT
199# define GLUT_CURSOR_NONE FL_CURSOR_NONE
200# define GLUT_CURSOR_FULL_CROSSHAIR FL_CURSOR_CROSS
201
202 inline void glutWarpPointer(int, int) { /* do nothing */ }
203
204 inline void glutEstablishOverlay() {
205 if (glut_window) glut_window->make_overlay_current();
206}
207
208 inline void glutRemoveOverlay() {
209 if (glut_window) glut_window->hide_overlay();
210}
211
212 inline void glutUseLayer(GLenum layer) {
213 if (!glut_window)
214 return;
215 layer ? glut_window->make_overlay_current() : glut_window->make_current();
216}
217
218 enum {GLUT_NORMAL, GLUT_OVERLAY};
219
220 inline void glutPostOverlayRedisplay() {
221 if (glut_window) glut_window->redraw_overlay();
222}
223
224 inline void glutShowOverlay() {
225 if (glut_window) glut_window->redraw_overlay();
226}
227
228 inline void glutHideOverlay() {
229 if (glut_window) glut_window->hide_overlay();
230}
231
232FL_EXPORT int glutCreateMenu(void (*)(int));
233
234FL_EXPORT void glutDestroyMenu(int menu);
235
236 inline int glutGetMenu() {return glut_menu;}
237
238 inline void glutSetMenu(int m) {glut_menu = m;}
239
240FL_EXPORT void glutAddMenuEntry(const char *label, int value);
241
242FL_EXPORT void glutAddSubMenu(char *label, int submenu);
243
244FL_EXPORT void glutChangeToMenuEntry(int item, char *labela, int value);
245
246FL_EXPORT void glutChangeToSubMenu(int item, char *label, int submenu);
247
248FL_EXPORT void glutRemoveMenuItem(int item);
249
250 inline void glutAttachMenu(int b) {
251 if (glut_window) glut_window->menu[b] = glut_menu;
252}
253
254 inline void glutDetachMenu(int b) {
255 if (glut_window) glut_window->menu[b] = 0;
256}
257
258 inline void glutDisplayFunc(void (*f)()) {
259 if (glut_window) glut_window->display = f;
260}
261
262 inline void glutReshapeFunc(void (*f)(int w, int h)) {
263 if (glut_window) glut_window->reshape = f;
264}
265
266 inline void glutKeyboardFunc(void (*f)(uchar key, int x, int y)) {
267 if (glut_window) glut_window->keyboard = f;
268}
269
270 inline void glutMouseFunc(void (*f)(int b, int state, int x, int y)) {
271 if (glut_window) glut_window->mouse = f;
272}
273
274# define GLUT_LEFT_BUTTON 0
275# define GLUT_MIDDLE_BUTTON 1
276# define GLUT_RIGHT_BUTTON 2
277# define GLUT_DOWN 0
278# define GLUT_UP 1
279
280 inline void glutMotionFunc(void (*f)(int x, int y)) {
281 if (glut_window) glut_window->motion = f;
282}
283
284 inline void glutPassiveMotionFunc(void (*f)(int x, int y)) {
285 if (glut_window) glut_window->passivemotion = f;
286}
287
288 inline void glutEntryFunc(void (*f)(int s)) {
289 if (glut_window) glut_window->entry = f;
290}
291
292 enum {GLUT_LEFT, GLUT_ENTERED};
293
294 inline void glutVisibilityFunc(void (*f)(int s)) {
295 if (glut_window) glut_window->visibility = f;
296}
297 enum {GLUT_NOT_VISIBLE, GLUT_VISIBLE};
298
299FL_EXPORT void glutIdleFunc(void (*f)());
300
301 inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) {
302 Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)(fl_intptr_t)value);
303}
304
305 inline void glutMenuStateFunc(void (*f)(int state)) {
306 glut_menustate_function = f;}
307
308 inline void glutMenuStatusFunc(void (*f)(int status, int x, int y)) {
309 glut_menustatus_function = f;}
310 enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE};
311
312 inline void glutSpecialFunc(void (*f)(int key, int x, int y)) {
313 if (glut_window) glut_window->special = f;
314}
315
316# define GLUT_KEY_F1 1
317# define GLUT_KEY_F2 2
318# define GLUT_KEY_F3 3
319# define GLUT_KEY_F4 4
320# define GLUT_KEY_F5 5
321# define GLUT_KEY_F6 6
322# define GLUT_KEY_F7 7
323# define GLUT_KEY_F8 8
324# define GLUT_KEY_F9 9
325# define GLUT_KEY_F10 10
326# define GLUT_KEY_F11 11
327# define GLUT_KEY_F12 12
328// WARNING: Different values than GLUT uses:
329# define GLUT_KEY_LEFT FL_Left
330# define GLUT_KEY_UP FL_Up
331# define GLUT_KEY_RIGHT FL_Right
332# define GLUT_KEY_DOWN FL_Down
333# define GLUT_KEY_PAGE_UP FL_Page_Up
334# define GLUT_KEY_PAGE_DOWN FL_Page_Down
335# define GLUT_KEY_HOME FL_Home
336# define GLUT_KEY_END FL_End
337# define GLUT_KEY_INSERT FL_Insert
338
339// inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z));
340
341// inline void glutSpaceballRotateFunc(void (*)(int x, int y, int z));
342
343// inline void glutSpaceballButtonFunc(void (*)(int button, int state));
344
345// inline void glutButtonBoxFunc(void (*)(int button, int state));
346
347// inline void glutDialsFunc(void (*)(int dial, int value));
348
349// inline void glutTabletMotionFunc(void (*)(int x, int y));
350
351// inline void glutTabletButtonFunc(void (*)(int button, int state, int x, int y));
352
353 inline void glutOverlayDisplayFunc(void (*f)()) {
354 if (glut_window) glut_window->overlaydisplay = f;
355}
356
357// inline void glutWindowStatusFunc(void (*)(int state));
358// enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED,
359// GLUT_FULLY_COVERED};
360
361// inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
362
363// inline GLfloat glutGetColor(int ndx, int component);
364// #define GLUT_RED 0
365// #define GLUT_GREEN 1
366// #define GLUT_BLUE 2
367
368// inline void glutCopyColormap(int win);
369
370// Warning: values are changed from GLUT!
371// Also relies on the GL_ symbols having values greater than 100
372FL_EXPORT int glutGet(GLenum type);
373 enum {
374 GLUT_RETURN_ZERO = 0,
375 GLUT_WINDOW_X,
376 GLUT_WINDOW_Y,
377 GLUT_WINDOW_WIDTH,
378 GLUT_WINDOW_HEIGHT,
379 GLUT_WINDOW_PARENT,
380 GLUT_SCREEN_WIDTH,
381 GLUT_SCREEN_HEIGHT,
382 GLUT_MENU_NUM_ITEMS,
383 GLUT_DISPLAY_MODE_POSSIBLE,
384 GLUT_INIT_WINDOW_X,
385 GLUT_INIT_WINDOW_Y,
386 GLUT_INIT_WINDOW_WIDTH,
387 GLUT_INIT_WINDOW_HEIGHT,
388 GLUT_INIT_DISPLAY_MODE,
389 GLUT_WINDOW_BUFFER_SIZE,
390 GLUT_VERSION,
391//GLUT_WINDOW_NUM_CHILDREN,
392//GLUT_WINDOW_CURSOR,
393//GLUT_SCREEN_WIDTH_MM,
394//GLUT_SCREEN_HEIGHT_MM,
395 GLUT_ELAPSED_TIME
396};
397
398# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS
399# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS
400# define GLUT_WINDOW_RED_SIZE GL_RED_BITS
401# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS
402# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS
403# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS
404# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS
405# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS
406# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS
407# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS
408# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER
409# define GLUT_WINDOW_RGBA GL_RGBA
410# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS
411# ifdef GL_SAMPLES_SGIS
412# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS
413# else
414# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO
415# endif
416# define GLUT_WINDOW_STEREO GL_STEREO
417
418# define GLUT_HAS_KEYBOARD 600
419# define GLUT_HAS_MOUSE 601
420# define GLUT_HAS_SPACEBALL 602
421# define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
422# define GLUT_HAS_TABLET 604
423# define GLUT_NUM_MOUSE_BUTTONS 605
424# define GLUT_NUM_SPACEBALL_BUTTONS 606
425# define GLUT_NUM_BUTTON_BOX_BUTTONS 607
426# define GLUT_NUM_DIALS 608
427# define GLUT_NUM_TABLET_BUTTONS 609
428FL_EXPORT int glutDeviceGet(GLenum type);
429
430// WARNING: these values are different than GLUT uses:
431# define GLUT_ACTIVE_SHIFT FL_SHIFT
432# define GLUT_ACTIVE_CTRL FL_CTRL
433# define GLUT_ACTIVE_ALT FL_ALT
434
435 inline int glutGetModifiers() {
436 return Fl::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);
437}
438
439FL_EXPORT int glutLayerGet(GLenum);
440# define GLUT_OVERLAY_POSSIBLE 800
441//#define GLUT_LAYER_IN_USE 801
442//#define GLUT_HAS_OVERLAY 802
443# define GLUT_TRANSPARENT_INDEX 803
444# define GLUT_NORMAL_DAMAGED 804
445# define GLUT_OVERLAY_DAMAGED 805
446
447 extern "C" {
448 typedef void (*GLUTproc)();
449}
450
451FL_EXPORT GLUTproc glutGetProcAddress(const char *procName);
452
453// inline int glutVideoResizeGet(GLenum param);
454// #define GLUT_VIDEO_RESIZE_POSSIBLE 900
455// #define GLUT_VIDEO_RESIZE_IN_USE 901
456// #define GLUT_VIDEO_RESIZE_X_DELTA 902
457// #define GLUT_VIDEO_RESIZE_Y_DELTA 903
458// #define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
459// #define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
460// #define GLUT_VIDEO_RESIZE_X 906
461// #define GLUT_VIDEO_RESIZE_Y 907
462// #define GLUT_VIDEO_RESIZE_WIDTH 908
463// #define GLUT_VIDEO_RESIZE_HEIGHT 909
464
465// inline void glutSetupVideoResizing();
466
467// inline void glutStopVideoResizing();
468
469// inline void glutVideoResize(int x, int y, int width, int height);
470
471// inline void glutVideoPan(int x, int y, int width, int height);
472
473// Font argument must be a void* for compatibility, so...
475 struct Fl_Glut_Bitmap_Font {Fl_Font font; Fl_Fontsize size;};
476
477 extern FL_EXPORT struct Fl_Glut_Bitmap_Font
478 glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10,
479 glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12,
480 glutBitmapHelvetica18;
481# define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
482# define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
483# define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
484# define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
485# define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
486# define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
487# define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
488
489FL_EXPORT void glutBitmapCharacter(void *font, int character);
490FL_EXPORT int glutBitmapHeight(void *font);
491FL_EXPORT int glutBitmapLength(void *font, const unsigned char *string);
492FL_EXPORT void glutBitmapString(void *font, const unsigned char *string);
493FL_EXPORT int glutBitmapWidth(void *font, int character);
494
495FL_EXPORT int glutExtensionSupported(char *name);
496
497/* GLUT stroked font sub-API */
498 struct Fl_Glut_StrokeVertex {
499 GLfloat X, Y;
500};
501
502 struct Fl_Glut_StrokeStrip {
503 int Number;
504 const Fl_Glut_StrokeVertex* Vertices;
505};
506
507 struct Fl_Glut_StrokeChar {
508 GLfloat Right;
509 int Number;
510 const Fl_Glut_StrokeStrip* Strips;
511};
512
513 struct Fl_Glut_StrokeFont {
514 char* Name; // The source font name
515 int Quantity; // Number of chars in font
516 GLfloat Height; // Height of the characters
517 const Fl_Glut_StrokeChar** Characters;// The characters mapping
518};
519 extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeRoman;
520 extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeMonoRoman;
521# define GLUT_STROKE_ROMAN (&glutStrokeRoman)
522# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
523
524FL_EXPORT void glutStrokeCharacter(void *font, int character);
525FL_EXPORT GLfloat glutStrokeHeight(void *font);
526FL_EXPORT int glutStrokeLength(void *font, const unsigned char *string);
527FL_EXPORT void glutStrokeString(void *font, const unsigned char *string);
528FL_EXPORT int glutStrokeWidth(void *font, int character);
529
530/* GLUT pre-built models sub-API */
531FL_EXPORT void glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
532FL_EXPORT void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
533FL_EXPORT void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
534FL_EXPORT void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
535FL_EXPORT void glutWireCube(GLdouble size);
536FL_EXPORT void glutSolidCube(GLdouble size);
537FL_EXPORT void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
538FL_EXPORT void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
539FL_EXPORT void glutWireDodecahedron();
540FL_EXPORT void glutSolidDodecahedron();
541FL_EXPORT void glutWireTeapot(GLdouble size);
542FL_EXPORT void glutSolidTeapot(GLdouble size);
543FL_EXPORT void glutWireOctahedron();
544FL_EXPORT void glutSolidOctahedron();
545FL_EXPORT void glutWireTetrahedron();
546FL_EXPORT void glutSolidTetrahedron();
547FL_EXPORT void glutWireIcosahedron();
548FL_EXPORT void glutSolidIcosahedron();
549
550#endif // !_FL_glut_H_
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:1063
Fl_Cursor
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition Enumerations.H:1283
Fl_Fontsize
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1092
Fl.H
Fl static class.
Fl_Gl_Window::make_current
void make_current()
The make_current() method selects the OpenGL context for the widget.
Definition Fl_Gl_Window.cxx:117
Fl_Gl_Window::draw
void draw() FL_OVERRIDE
Draws the Fl_Gl_Window.
Definition Fl_Gl_Window.cxx:502
Fl_Gl_Window::Fl_Gl_Window
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:246
Fl_Gl_Window::handle
int handle(int) FL_OVERRIDE
Handle some FLTK events as needed.
Definition Fl_Gl_Window.cxx:511
Fl_Glut_Window
GLUT is emulated using this window class and these static variables (plus several more static variabl...
Definition glut.H:53
Fl_Glut_Window::Fl_Glut_Window
Fl_Glut_Window(int w, int h, const char *t=0)
Creates a glut window, registers to the glut windows list.
Definition glut_compatibility.cxx:186
Fl_Glut_Window::draw_overlay
void draw_overlay() FL_OVERRIDE
You must implement this virtual function if you want to draw into the overlay.
Definition glut_compatibility.cxx:69
Fl::add_timeout
static void add_timeout(double t, Fl_Timeout_Handler cb, void *data=0)
Adds a one-shot timeout callback.
Definition Fl.cxx:277
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
uchar
unsigned char uchar
unsigned char
Definition fl_types.h:30
gl.h
This file defines wrapper functions for OpenGL in FLTK.
Fl::event_state
static int event_state()
Returns the keyboard and mouse button states of the last event.
Definition Fl.H:754
fl_intptr_t
opaque fl_intptr_t
An integral type large enough to store a pointer or a long value.
Definition platform_types.h:31
Fl_Glut_Bitmap_Font
fltk glut font/size attributes used in the glutXXX functions
Definition glut.H:475
Fl_Glut_StrokeChar
Definition glut.H:507
Fl_Glut_StrokeFont
Definition glut.H:513
Fl_Glut_StrokeStrip
Definition glut.H:502
Fl_Glut_StrokeVertex
Definition glut.H:498