From 20775caf087684e5315f1e19d6720a44221d8532 Mon Sep 17 00:00:00 2001 From: engelsman Date: Thu, 9 Apr 2009 20:44:31 +0000 Subject: 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 --- FL/gl.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'FL') 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); -- cgit v1.2.3