diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
| commit | f9039b2ae21988783feae9b362818e7923e82d14 (patch) | |
| tree | 6d6fe3679d73448758f9794e7d4d4f6b22a4adad /FL/gl.h | |
| parent | 67e89232f9ba067825a158734a09e0fa21aacbe3 (diff) | |
Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/gl.h')
| -rw-r--r-- | FL/gl.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/FL/gl.h b/FL/gl.h new file mode 100644 index 000000000..5db50e046 --- /dev/null +++ b/FL/gl.h @@ -0,0 +1,42 @@ +// gl.H +// Fltk gl drawing functions. +// You must include this instead of GL/gl.h to get around a stupid +// fuck up by our good friends at Microsloth. +// This file also provides "missing" OpenGL functions, and +// gl_start() and gl_finish() to allow OpenGL to be used in any window + +#ifndef gl_draw_H +#define gl_draw_H + +#include "Enumerations.H" // for color names +#ifdef WIN32 +# include <windows.h> +#endif +#include <GL/gl.h> + +void gl_start(); +void gl_finish(); + +void gl_color(Fl_Color); +inline void gl_color(int c) {gl_color((Fl_Color)c);} // back compatability + +void gl_rect(int x,int y,int w,int h); +inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);} + +void gl_font(int fontid, int size); +int gl_height(); +int gl_descent(); +double gl_width(const char *); +double gl_width(const char *, int n); +double gl_width(uchar); + +void gl_draw(const char*); +void gl_draw(const char*, int n); +void gl_draw(const char*, int x, int y); +void gl_draw(const char*, int n, int x, int y); +void gl_draw(const char*, int x, int y, int w, int h, Fl_Align); +void gl_measure(const char*, int& x, int& y); + +void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0); + +#endif |
