source: NonGTP/FLTK/include/fltk/gl.h @ 773

Revision 773, 2.6 KB checked in by gumbau, 19 years ago (diff)

FLTK imported to SVN repository to be linked agains the GeoTool? application

Line 
1//
2// "$Id: gl.h 4405 2005-06-30 03:50:35Z spitzak $"
3//
4// OpenGL header file for the Fast Light Tool Kit (FLTK).
5//
6// Copyright 1998-2003 by Bill Spitzak and others.
7//
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
10// header files.
11//
12// This file also provides "missing" OpenGL functions, and
13// gl_start() and gl_finish() to allow OpenGL to be used in any window
14//
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.
19//
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.
24//
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
28// USA.
29//
30// Please report all bugs and problems to "fltk-bugs@fltk.org".
31//
32
33#ifndef gl_draw_H
34#define gl_draw_H
35
36#include "Color.h"
37#include "Flags.h"
38
39#ifdef _WIN32
40# include <windows.h>
41# include <GL/gl.h>
42# undef OPAQUE
43# undef DELETE
44# undef ERROR
45# undef IN
46# undef OUT
47# undef POINT
48# undef far
49# undef max
50# undef min
51# undef near
52#elif defined(__APPLE__)
53# include <OpenGL/gl.h>
54#else
55# ifndef APIENTRY
56#  if defined(__CYGWIN__)
57#   define APIENTRY __attribute__ ((__stdcall__))
58#  else
59#   define APIENTRY
60#  endif
61# endif
62# include <GL/gl.h>
63#endif
64
65namespace fltk {
66
67struct Font;
68
69/*! \addtogroup opengl
70  \ingroup drawing
71  \{ */
72FL_GL_API void glstart();
73FL_GL_API void glfinish();
74
75FL_GL_API void glsetcolor(Color);
76
77FL_GL_API void glstrokerect(int x,int y,int w,int h);
78inline void glfillrect(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);}
79
80FL_GL_API void glsetfont(Font* f, float size);
81FL_GL_API float glgetascent();
82FL_GL_API float glgetdescent();
83FL_GL_API float glgetwidth(const char *);
84FL_GL_API float glgetwidth(const char *, int n);
85
86FL_GL_API void gldrawtext(const char*);
87FL_GL_API void gldrawtext(const char*, int n);
88FL_GL_API void gldrawtext(const char*, float x, float y, float z = 0);
89FL_GL_API void gldrawtext(const char*, int n, float x, float y, float z = 0);
90
91FL_GL_API void gldrawimage(const uchar *, int x,int y,int w,int h, int d=3, int ld=0);
92/*! \} */
93
94}
95#endif
96
97//
98// End of "$Id: gl.h 4405 2005-06-30 03:50:35Z spitzak $".
99//
Note: See TracBrowser for help on using the repository browser.