2 // "$Id: gl.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 // You must include this instead of GL/gl.h to get the Microsoft
9 // APIENTRY stuff included (from <windows.h>) prior to the OpenGL
12 // This file also provides "missing" OpenGL functions, and
13 // gl_start() and gl_finish() to allow OpenGL to be used in any window
15 // This library is free software; you can redistribute it and/or
16 // modify it under the terms of the GNU Library General Public
17 // License as published by the Free Software Foundation; either
18 // version 2 of the License, or (at your option) any later version.
20 // This library is distributed in the hope that it will be useful,
21 // but WITHOUT ANY WARRANTY; without even the implied warranty of
22 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 // Library General Public License for more details.
25 // You should have received a copy of the GNU Library General Public
26 // License along with this library; if not, write to the Free Software
27 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
30 // Please report all bugs and problems to "fltk-bugs@fltk.org".
36 # include "Enumerations.H" // for color names
41 # if defined(__CYGWIN__)
42 # define APIENTRY __attribute__ ((__stdcall__))
49 # include <OpenGL/gl.h>
54 FL_EXPORT void gl_start();
55 FL_EXPORT void gl_finish();
57 FL_EXPORT void gl_color(Fl_Color);
58 inline void gl_color(int c) {gl_color((Fl_Color)c);} // back compatability
60 FL_EXPORT void gl_rect(int x,int y,int w,int h);
61 inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);}
63 FL_EXPORT void gl_font(int fontid, int size);
64 FL_EXPORT int gl_height();
65 FL_EXPORT int gl_descent();
66 FL_EXPORT double gl_width(const char *);
67 FL_EXPORT double gl_width(const char *, int n);
68 FL_EXPORT double gl_width(uchar);
70 FL_EXPORT void gl_draw(const char*);
71 FL_EXPORT void gl_draw(const char*, int n);
72 FL_EXPORT void gl_draw(const char*, int x, int y);
73 FL_EXPORT void gl_draw(const char*, float x, float y);
74 FL_EXPORT void gl_draw(const char*, int n, int x, int y);
75 FL_EXPORT void gl_draw(const char*, int n, float x, float y);
76 FL_EXPORT void gl_draw(const char*, int x, int y, int w, int h, Fl_Align);
77 FL_EXPORT void gl_measure(const char*, int& x, int& y);
79 FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0);
84 // End of "$Id: gl.h,v 1.2 2002/12/01 15:38:37 neurosurg Exp $".