00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FL_GL_H_
00023 #define _FL_GL_H_
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include "Fl_Color.h"
00035 #include "Fl_Flags.h"
00036 #include "Fl_Font.h"
00037
00038 #ifdef _WIN32
00039 # include <windows.h>
00040 #endif
00041 #ifndef APIENTRY
00042 # if defined(__CYGWIN__)
00043 # define APIENTRY __attribute__ ((__stdcall__))
00044 # else
00045 # define APIENTRY
00046 # endif
00047 #endif
00048
00049 #ifdef __APPLE__
00050 # include <OpenGL/gl.h>
00051 #else
00052 # include <GL/gl.h>
00053 #endif
00054
00055 FL_API void gl_start();
00056 FL_API void gl_finish();
00057
00058 FL_API void gl_color(Fl_Color);
00059
00060 FL_API void gl_rect(int x,int y,int w,int h);
00061 inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h); }
00062
00063 FL_API void gl_font(Fl_Font f, float size);
00064 FL_API float gl_height();
00065 FL_API float gl_descent();
00066 FL_API float gl_width(const char *);
00067 FL_API float gl_width(const char *, int n);
00068
00069 FL_API void gl_draw(const char*);
00070 FL_API void gl_draw(const char*, int n);
00071 FL_API void gl_draw(const char*, float x, float y, float z = 0);
00072 FL_API void gl_draw(const char*, int n, float x, float y, float z = 0);
00073
00074 FL_API void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0);
00075
00076 #endif