Functions | |
| void | glstart () |
| void | glfinish () |
| void | glsetcolor (Color) |
| void | glstrokerect (int x, int y, int w, int h) |
| void | glfillrect (int x, int y, int w, int h) |
| void | glsetfont (Font *f, float size) |
| float | glgetascent () |
| float | glgetdescent () |
| float | glgetwidth (const char *) |
| float | glgetwidth (const char *, int n) |
| void | gldrawtext (const char *) |
| void | gldrawtext (const char *, int n) |
| void | gldrawtext (const char *, float x, float y, float z=0) |
| void | gldrawtext (const char *, int n, float x, float y, float z=0) |
| void | gldrawimage (const uchar *, int x, int y, int w, int h, int d=3, int ld=0) |
|
||||||||||||||||||||||||||||||||
|
Uses glDrawPixels to draw an image using the same arguments as drawimage(). If you are in the normal OpenGL coordinate system with 0,0 in the lower-left, the first pixel is memory is the lower-left corner. |
|
||||||||||||||||||||||||
|
Draw the first n bytes of text at the given point in 3D space transformed to the screen. |
|
||||||||||||||||||||
|
Draw text at the given point in 3D space transformed to the screen. |
|
||||||||||||
|
Draw the first n bytes of text at the current glRasterPos. |
|
|
Draw text at the current glRasterPos in the current font selected with glsetfont(). You can use glRasterPos2f() or similar calls to set the position before calling this. The string is in UTF-8, although only characters in ISO-8859-1 are drawn correctly, others draw as question marks. |
|
||||||||||||||||||||
|
Inline wrapper for glRecti(x,y,x+w,y+h). |
|
|
Turn off the effects of a previous glstart(). You must call this before using normal fltk drawing methods. |
|
|
Set the current OpenGL color to a FLTK color, or as close as possible. |
|
||||||||||||
|
Make the current OpenGL font (as used by gldrawtext()) be as similar as possible to an FLTK Font. Currently the font is aliased except on X. |
|
|
Set up an OpenGL context to draw into the current window being drawn by fltk. This will allow you to use OpenGL to update a normal window. The current transformation is reproduced, and the current clipping is simulated with glScissor() calls (which can only do a rectangle). You must use glfinish() to exit this mode before any normal fltk drawing calls are done. You should call glvisual() at program startup if you intend to use this. This may be used to change how windows are created so this call works. I would like this to work reliably, but it is not real good now on any platforms. In particular it does not cooperate with the double-buffering schemes. It does appear to work on X when you turn off double buffering, it also works if OpenGL is entirely software, such as MESA. Do not call glstart()/glfinish() when drawing into a GlWindow! |
|
||||||||||||||||||||
|
Draw a 1-thick line just inside the given rectangle. |
©2006 Bill Spitzak and others.