FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

gl.h
Go to the documentation of this file.

    00001 //
    00002 // "$Id: gl.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
    00003 //
    00004 // OpenGL header file for the Fast Light Tool Kit (FLTK).
    00005 //
    00006 // Copyright 1998-2011 by Bill Spitzak and others.
    00007 //
    00008 // You must include this instead of GL/gl.h to get the Microsoft
    00009 // APIENTRY stuff included (from <windows.h>) prior to the OpenGL
    00010 // header files.
    00011 //
    00012 // This file also provides "missing" OpenGL functions, and
    00013 // gl_start() and gl_finish() to allow OpenGL to be used in any window
    00014 //
    00015 // This library is free software. Distribution and use rights are outlined in
    00016 // the file "COPYING" which should have been included with this file.  If this
    00017 // file is missing or damaged, see the license at:
    00018 //
    00019 //     http://www.fltk.org/COPYING.php
    00020 //
    00021 // Please report all bugs and problems on the following page:
    00022 //
    00023 //     http://www.fltk.org/str.php
    00024 //
    00025
    00042 #ifndef FL_gl_H
    00043 #  define FL_gl_H
    00044
    00045 #  include "Enumerations.H" // for color names
    00046 #  ifdef WIN32
    00047 #    include <windows.h>
    00048 #  endif
    00049 #  ifndef APIENTRY
    00050 #    if defined(__CYGWIN__)
    00051 #      define APIENTRY __attribute__ ((__stdcall__))
    00052 #    else
    00053 #      define APIENTRY
    00054 #    endif
    00055 #  endif
    00056
    00057 #  ifdef __APPLE__
    00058 #    include <OpenGL/gl.h>
    00059 #  else
    00060 #    include <GL/gl.h>
    00061 #  endif
    00062
    00063 FL_EXPORT void gl_start();
    00064 FL_EXPORT void gl_finish();
    00065
    00066 FL_EXPORT void gl_color(Fl_Color i);
    00068 inline void gl_color(int c) {gl_color((Fl_Color)c);}
    00069
    00070 FL_EXPORT void gl_rect(int x,int y,int w,int h);
    00075 inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);}
    00076
    00077 FL_EXPORT void gl_font(int fontid, int size);
    00078 FL_EXPORT int  gl_height();
    00079 FL_EXPORT int  gl_descent();
    00080 FL_EXPORT double gl_width(const char *);
    00081 FL_EXPORT double gl_width(const char *, int n);
    00082 FL_EXPORT double gl_width(uchar);
    00083
    00084 FL_EXPORT void gl_draw(const char*);
    00085 FL_EXPORT void gl_draw(const char*, int n);
    00086 FL_EXPORT void gl_draw(const char*, int x, int y);
    00087 FL_EXPORT void gl_draw(const char*, float x, float y);
    00088 FL_EXPORT void gl_draw(const char*, int n, int x, int y);
    00089 FL_EXPORT void gl_draw(const char*, int n, float x, float y);
    00090 FL_EXPORT void gl_draw(const char*, int x, int y, int w, int h, Fl_Align);
    00091 FL_EXPORT void gl_measure(const char*, int& x, int& y);
    00092 #ifdef __APPLE__
    00093 extern FL_EXPORT void gl_texture_pile_height(int max);
    00094 extern FL_EXPORT int gl_texture_pile_height();
    00095 #endif
    00096
    00097 FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0);
    00098
    00099 #endif // !FL_gl_H
    00100
    00101 //
    00102 // End of "$Id: gl.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
    00103 //