summaryrefslogtreecommitdiff
path: root/FL/gl.h
diff options
context:
space:
mode:
authorengelsman <engelsman>2009-04-09 20:44:31 +0000
committerengelsman <engelsman>2009-04-09 20:44:31 +0000
commit20775caf087684e5315f1e19d6720a44221d8532 (patch)
treebcfcc093b12e48a2016e31a1a90c962a04cc7666 /FL/gl.h
parent8dd0abe3f20d4de3034428c541ef3f25ce7cc4e2 (diff)
converted html tags to doxygen commands in opengl.dox
also corrected function signatures in opengl.dox added doxygen comments to FL/gl.h, src/gl_start.cxx, src/gl_draw.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6749 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/gl.h')
-rw-r--r--FL/gl.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/FL/gl.h b/FL/gl.h
index 095824dc2..d1d76a239 100644
--- a/FL/gl.h
+++ b/FL/gl.h
@@ -32,6 +32,22 @@
// http://www.fltk.org/str.php
//
+/** \file gl.h
+ * This file defines wrapper functions for OpenGL in FLTK
+ *
+ * To use OpenGL from within an FLTK application you MUST use gl_visual()
+ * to select the default visual before doing show() on any windows. Mesa
+ * will crash if yoy try to use a visual not returned by glxChooseVidual.
+ *
+ * This does not work with Fl_Double_Window's! It will try to draw
+ * into the front buffer. Depending on the system this will either
+ * crash or do nothing (when pixmaps are being used as back buffer
+ * and GL is being done by hardware), work correctly (when GL is done
+ * with software, such as Mesa), or draw into the front buffer and
+ * be erased when the buffers are swapped (when double buffer hardware
+ * is being used)
+ */
+
#ifndef FL_gl_H
# define FL_gl_H
@@ -56,10 +72,15 @@
FL_EXPORT void gl_start();
FL_EXPORT void gl_finish();
-FL_EXPORT void gl_color(Fl_Color);
-inline void gl_color(int c) {gl_color((Fl_Color)c);} // back compatability
+FL_EXPORT void gl_color(Fl_Color i);
+/** back compatability */
+inline void gl_color(int c) {gl_color((Fl_Color)c);}
FL_EXPORT void gl_rect(int x,int y,int w,int h);
+/**
+ Fills the given rectangle with the current color.
+ \see gl_rect(int x, int y, int w, int h)
+ */
inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);}
FL_EXPORT void gl_font(int fontid, int size);