Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

gl.h

00001 /*
00002  * $Id: gl.h,v 1.4 2003/01/09 16:14:28 laza2000 Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_GL_H_
00023 #define _FL_GL_H_
00024 
00025 //
00026 // You must include this instead of GL/gl.h to get the Microsoft
00027 // APIENTRY stuff included (from <windows.h>) prior to the OpenGL
00028 // header files.
00029 //
00030 // This file also provides "missing" OpenGL functions, and
00031 // gl_start() and gl_finish() to allow OpenGL to be used in any window
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

Generated on Thu Jul 31 15:33:46 2003 for eFLTK by doxygen1.2.15