| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
void (*VisuGlTextFunc) (const gchar *text,VisuGlTextSize size); enum VisuGlTextSize; void visu_gl_text_drawChars (gchar *s,VisuGlTextSize size); void visu_gl_text_initFontList (); void visu_gl_text_onNewContext (); void visu_gl_text_putTextWithFTGL (const gchar *text,VisuGlTextSize size); void visu_gl_text_rebuildFontList (); gboolean visu_gl_text_setFontSize (float size); gboolean visu_gl_text_setFunc (VisuGlTextFunc func);
For the moment, this module is very basic and the only fonts available is the helvetica 12 one. This module is currently broken under Windows.
void (*VisuGlTextFunc) (const gchar *text,VisuGlTextSize size);
A function that render iso8859-1 text at the current raster position.
|
the text to render. |
|
the size for rendering. |
Since 3.7
typedef enum {
VISU_GL_TEXT_NORMAL,
VISU_GL_TEXT_SMALL
} VisuGlTextSize;
Different text size available in V_Sim.
void visu_gl_text_drawChars (gchar *s,VisuGlTextSize size);
Draw the given string on the current raster position with default font.
|
a string. |
|
the size of the text to render. |
void visu_gl_text_initFontList ();
Initialise the font drawing with default font (depending on system).
It must be called before visu_gl_text_drawChars() and not in a glNewList().
Can be called several times, fonts are initialized once only. Use
visu_gl_text_rebuildFontList() to force to build a new font list.
void visu_gl_text_onNewContext ();
Set the flag for text list build to FALSE. It will force to rebuild
the text lists at next call of visu_gl_text_initFontList().
Since 3.6
void visu_gl_text_putTextWithFTGL (const gchar *text,VisuGlTextSize size);
A VisuGlTextFunc routine using FTGL to render text with Pixmap
lists, see visu_gl_text_setFunc().
|
the text to write. |
|
the size. |
Since 3.7
void visu_gl_text_rebuildFontList ();
Force to buid a new font list (for example new context has changed.
gboolean visu_gl_text_setFontSize (float size);
Change the normal font size used by V_Sim (see VISU_GL_TEXT_NORMAL). The small font is scaled accordingly. This is working only with the FTGL backend.
|
a new size. |
Returns : |
TRUE if font size is indeed changed. |
Since 3.7
gboolean visu_gl_text_setFunc (VisuGlTextFunc func);
Set the function to render text at the raster position.
|
a VisuGlTextFunc function. [scope call][allow-none] |
Returns : |
TRUE if the function is indeed changed. |
Since 3.7