fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

gl.h File Reference

#include "Enumerations.H"
#include <GL/gl.h>
Include dependency graph for gl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define APIENTRY

Functions

FL_EXPORT void gl_start ()
FL_EXPORT void gl_finish ()
FL_EXPORT void gl_color (Fl_Color i)
void gl_color (int c)
FL_EXPORT void gl_rect (int x, int y, int w, int h)
void gl_rectf (int x, int y, int w, int h)
FL_EXPORT void gl_font (int fontid, int size)
FL_EXPORT int gl_height ()
FL_EXPORT int gl_descent ()
FL_EXPORT double gl_width (const char *)
FL_EXPORT double gl_width (const char *, int n)
FL_EXPORT double gl_width (uchar)
FL_EXPORT void gl_draw (const char *)
FL_EXPORT void gl_draw (const char *, int n)
FL_EXPORT void gl_draw (const char *, int x, int y)
FL_EXPORT void gl_draw (const char *, float x, float y)
FL_EXPORT void gl_draw (const char *, int n, int x, int y)
FL_EXPORT void gl_draw (const char *, int n, float x, float y)
FL_EXPORT void gl_draw (const char *, int x, int y, int w, int h, Fl_Align)
FL_EXPORT void gl_measure (const char *, int &x, int &y)
FL_EXPORT void gl_draw_image (const uchar *, int x, int y, int w, int h, int d=3, int ld=0)

Detailed Description

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)

Definition in file gl.h.


Define Documentation

#define APIENTRY

Definition at line 62 of file gl.h.


Function Documentation

FL_EXPORT void gl_color ( Fl_Color  i)

Referenced by gl_color().

void gl_color ( int  c) [inline]

back compatability

Definition at line 77 of file gl.h.

References gl_color().

FL_EXPORT int gl_descent ( )
FL_EXPORT void gl_draw ( const char *  ,
int  x,
int  y,
int  w,
int  h,
Fl_Align   
)
FL_EXPORT void gl_draw ( const char *  ,
float  x,
float  y 
)
FL_EXPORT void gl_draw ( const char *  ,
int  n,
int  x,
int  y 
)
FL_EXPORT void gl_draw ( const char *  ,
int  n,
float  x,
float  y 
)
FL_EXPORT void gl_draw ( const char *  ,
int  x,
int  y 
)
FL_EXPORT void gl_draw ( const char *  )
FL_EXPORT void gl_draw ( const char *  ,
int  n 
)
FL_EXPORT void gl_draw_image ( const uchar ,
int  x,
int  y,
int  w,
int  h,
int  d = 3,
int  ld = 0 
)
FL_EXPORT void gl_finish ( )
FL_EXPORT void gl_font ( int  fontid,
int  size 
)
FL_EXPORT int gl_height ( )
FL_EXPORT void gl_measure ( const char *  ,
int &  x,
int &  y 
)
FL_EXPORT void gl_rect ( int  x,
int  y,
int  w,
int  h 
)

Referenced by rect(), recti(), and rects().

void gl_rectf ( int  x,
int  y,
int  w,
int  h 
) [inline]

Fills the given rectangle with the current color.

See also:
gl_rect(int x, int y, int w, int h)

Definition at line 84 of file gl.h.

FL_EXPORT void gl_start ( )
FL_EXPORT double gl_width ( uchar  )
FL_EXPORT double gl_width ( const char *  )
FL_EXPORT double gl_width ( const char *  ,
int  n 
)