Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8ffe23af9b6e2265bcac8526648e8186 > files > 120

alleggl-devel-0.4.3-8.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>AllegroGL: Text drawing and fonts.</title>
<link href="alleggl.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>Text drawing and fonts.</h1>AllegroGL now provides mechanisms for converting Allegro FONTs to a format which is more usable in OpenGL.  
<a href="#_details">More...</a><h2>Text Drawing and Font conversion</h2>
<ul>
<li>int <a class="el" href="group__Text.html#g84ecf6d5f5b363d7715e15eca8ebafeb">allegro_gl_printf</a> (AL_CONST FONT *f, float x, float y, float z, int color, AL_CONST char *format,...)
<dl class="el"><dd class="mdescRight">Equivalent to:.  <a href="#g84ecf6d5f5b363d7715e15eca8ebafeb"></a><br></dl><li>int <a class="el" href="group__Text.html#gb93317445f8a566f8b5632e04fbf8e5b">allegro_gl_printf_ex</a> (AL_CONST FONT *f, float x, float y, float z, AL_CONST char *format,...)
<dl class="el"><dd class="mdescRight">Prints a formatted string (printf style) on the screen.  <a href="#gb93317445f8a566f8b5632e04fbf8e5b"></a><br></dl><li>FONT * <a class="el" href="group__Text.html#gd01388c5188ae09628284aa2425acae9">allegro_gl_convert_allegro_font</a> (FONT *f, int type, float scale)
<dl class="el"><dd class="mdescRight">Equivalent to:.  <a href="#gd01388c5188ae09628284aa2425acae9"></a><br></dl><li>FONT * <a class="el" href="group__Text.html#g4986ec80f1a3362e47f7669461fef414">allegro_gl_convert_allegro_font_ex</a> (FONT *f, int type, float scale, GLint format)
<dl class="el"><dd class="mdescRight">Converts a regular Allegro FONT to the AGL format for 3D display.  <a href="#g4986ec80f1a3362e47f7669461fef414"></a><br></dl><li>void <a class="el" href="group__Text.html#g62e79ccec5062f1cdadbc225319e9b44">allegro_gl_set_font_generation_mode</a> (int mode)
<dl class="el"><dd class="mdescRight">Set the font generation mode for system fonts.  <a href="#g62e79ccec5062f1cdadbc225319e9b44"></a><br></dl><li>FONT * <a class="el" href="group__Text.html#g5bddcc6c1954665140083928117519de">allegro_gl_load_system_font</a> (char *name, int style, int w, int h)
<dl class="el"><dd class="mdescRight">Short hand for aglf_load_system_font_ex(name, <a class="el" href="group__Text.html#gba7b8c941356029687ff4b4340e8b841" title="Indicates that you want fonts to be converted to an outline format.">AGL_FONT_TYPE_OUTLINE</a>, style, w, h, 0.0f, 32, 256).  <a href="#g5bddcc6c1954665140083928117519de"></a><br></dl><li>FONT * <a class="el" href="group__Text.html#g4ad68c54b0183c60cdbf2c7a02dc3157">allegro_gl_load_system_font_ex</a> (char *name, int type, int style, int w, int h, float depth, int start, int end)
<dl class="el"><dd class="mdescRight">Loads a system font.  <a href="#g4ad68c54b0183c60cdbf2c7a02dc3157"></a><br></dl><li>void <a class="el" href="group__Text.html#gbcbdd9810f7254cdb105f987ae1e557f">allegro_gl_destroy_font</a> (FONT *f)
<dl class="el"><dd class="mdescRight">Destroys the font.  <a href="#gbcbdd9810f7254cdb105f987ae1e557f"></a><br></dl><li>size_t <a class="el" href="group__Text.html#g70b78c3a523dc9977c222d466edc6a5a">allegro_gl_list_font_textures</a> (FONT *f, GLuint *ids, size_t max_num_id)
<dl class="el"><dd class="mdescRight">List the texture ID of all textures forming the specified font.  <a href="#g70b78c3a523dc9977c222d466edc6a5a"></a><br></dl><li>#define <a class="el" href="group__Text.html#gd2ebae17d2548a5befb888f8618f2206">AGL_FONT_TYPE_DONT_CARE</a>&nbsp;&nbsp;&nbsp;-1
<dl class="el"><dd class="mdescRight">Indicates that you don't really care how a font will be converted.  <a href="#gd2ebae17d2548a5befb888f8618f2206"></a><br></dl><li>#define <a class="el" href="group__Text.html#g7ed8fdc1b0065d2fe584b15d69108b1a">AGL_FONT_TYPE_BITMAP</a>&nbsp;&nbsp;&nbsp;0
<dl class="el"><dd class="mdescRight">Indicates that you want fonts to be converted to a bitmap format.  <a href="#g7ed8fdc1b0065d2fe584b15d69108b1a"></a><br></dl><li>#define <a class="el" href="group__Text.html#gba7b8c941356029687ff4b4340e8b841">AGL_FONT_TYPE_OUTLINE</a>&nbsp;&nbsp;&nbsp;1
<dl class="el"><dd class="mdescRight">Indicates that you want fonts to be converted to an outline format.  <a href="#gba7b8c941356029687ff4b4340e8b841"></a><br></dl><li>#define <a class="el" href="group__Text.html#g92bf039bc7b06568273ee17f15cf6671">AGL_FONT_TYPE_TEXTURED</a>&nbsp;&nbsp;&nbsp;2
<dl class="el"><dd class="mdescRight">Indicates that you want fonts to be converted to a texture format.  <a href="#g92bf039bc7b06568273ee17f15cf6671"></a><br></dl><li>#define <a class="el" href="group__Text.html#gb77d7d2c6ec6d1786472943f7cd814ca">AGL_FONT_STYLE_BOLD</a>&nbsp;&nbsp;&nbsp;1
<dl class="el"><dd class="mdescRight">Creates a font with bold characters.  <a href="#gb77d7d2c6ec6d1786472943f7cd814ca"></a><br></dl><li>#define <a class="el" href="group__Text.html#g27874c1fb7fdc1e00115bd853c973fc3">AGL_FONT_STYLE_BLACK</a>&nbsp;&nbsp;&nbsp;2
<dl class="el"><dd class="mdescRight">Creates a font with black (strong bold) characters.  <a href="#g27874c1fb7fdc1e00115bd853c973fc3"></a><br></dl><li>#define <a class="el" href="group__Text.html#g67c48bf08c2b6cd6cc1a08dec2c7c5ef">AGL_FONT_STYLE_ITALIC</a>&nbsp;&nbsp;&nbsp;4
<dl class="el"><dd class="mdescRight">Creates a font with italicized characters.  <a href="#g67c48bf08c2b6cd6cc1a08dec2c7c5ef"></a><br></dl><li>#define <a class="el" href="group__Text.html#ge9e4682339d264429ee601c632231c9f">AGL_FONT_STYLE_UNDERLINE</a>&nbsp;&nbsp;&nbsp;8
<dl class="el"><dd class="mdescRight">Creates a font with underlined characters.  <a href="#ge9e4682339d264429ee601c632231c9f"></a><br></dl><li>#define <a class="el" href="group__Text.html#g6ba31b9c7866d28b5494fad2577569db">AGL_FONT_STYLE_STRIKEOUT</a>&nbsp;&nbsp;&nbsp;16
<dl class="el"><dd class="mdescRight">Creates a font with striked out characters.  <a href="#g6ba31b9c7866d28b5494fad2577569db"></a><br></dl><li>#define <a class="el" href="group__Text.html#g91cc859278878dd4bf200bed7eab4359">AGL_FONT_STYLE_ANTI_ALIASED</a>&nbsp;&nbsp;&nbsp;32
<dl class="el"><dd class="mdescRight">Creates a font with anti-aliased characters.  <a href="#g91cc859278878dd4bf200bed7eab4359"></a><br></dl><li>#define <a class="el" href="group__Text.html#g4b45ef558e7934ceaaff146f450ab23f">AGL_FONT_POLYGONS</a>&nbsp;&nbsp;&nbsp;1
<dl class="el"><dd class="mdescRight">Font generation mode.  <a href="#g4b45ef558e7934ceaaff146f450ab23f"></a><br></dl><li>#define <a class="el" href="group__Text.html#g0b426eb30e7203eb094a7adfbb04cb6d">AGL_FONT_LINES</a>&nbsp;&nbsp;&nbsp;2
<dl class="el"><dd class="mdescRight">Font generation mode.  <a href="#g0b426eb30e7203eb094a7adfbb04cb6d"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
AllegroGL now provides mechanisms for converting Allegro FONTs to a format which is more usable in OpenGL. 
<p>
You can also load system fonts (such as Arial and Courrier) and draw using those. Allegro FONTs should still work if you use textout, textprintf, etc on them. However, converted Allegro FONTs will not work with these functions. You will have to use AllegroGL functions to work with AllegroGL FONTs. <hr><h2>Define Documentation</h2>
<a class="anchor" name="gd2ebae17d2548a5befb888f8618f2206"></a><!-- doxytag: member="alleggl.h::AGL_FONT_TYPE_DONT_CARE" ref="gd2ebae17d2548a5befb888f8618f2206" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_TYPE_DONT_CARE&nbsp;&nbsp;&nbsp;-1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Indicates that you don't really care how a font will be converted. 
<p>
AGL will pick the best format for you. 
<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00622">622</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l00685">allegro_gl_convert_allegro_font_ex()</a>.
</div>
</div><p>
<a class="anchor" name="g7ed8fdc1b0065d2fe584b15d69108b1a"></a><!-- doxytag: member="alleggl.h::AGL_FONT_TYPE_BITMAP" ref="g7ed8fdc1b0065d2fe584b15d69108b1a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_TYPE_BITMAP&nbsp;&nbsp;&nbsp;0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Indicates that you want fonts to be converted to a bitmap format. 
<p>
Bitmaps are used to represent characters with one bit per pixel, and are usually very slow to draw, as they stall the 3D pipeline. Note that you can't scale, rotate or place text with a z coordinate if you use this style. A display list will be created.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__Text.html#gd01388c5188ae09628284aa2425acae9" title="Equivalent to:.">allegro_gl_convert_allegro_font()</a>, <a class="el" href="group__Text.html#g84ecf6d5f5b363d7715e15eca8ebafeb" title="Equivalent to:.">allegro_gl_printf()</a> </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00633">633</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l00143">agl_char_length_fractional()</a>, <a class="el" href="fontconv_8c-source.html#l01668">aglf_convert_allegro_font_to_bitmap()</a>, <a class="el" href="fontconv_8c-source.html#l00685">allegro_gl_convert_allegro_font_ex()</a>, <a class="el" href="aglf_8c-source.html#l00573">allegro_gl_destroy_font()</a>, and <a class="el" href="aglf_8c-source.html#l00169">allegro_gl_printf_ex()</a>.
</div>
</div><p>
<a class="anchor" name="gba7b8c941356029687ff4b4340e8b841"></a><!-- doxytag: member="alleggl.h::AGL_FONT_TYPE_OUTLINE" ref="gba7b8c941356029687ff4b4340e8b841" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_TYPE_OUTLINE&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Indicates that you want fonts to be converted to an outline format. 
<p>
Outlined mode is a vector-style font. Characters are represented by a set of polygons and lines. This style of fonts is fast to draw, and can be scaled, rotated, etc, since they are just vectors. A display list will be created.<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__Text.html#gd01388c5188ae09628284aa2425acae9" title="Equivalent to:.">allegro_gl_convert_allegro_font()</a>, <a class="el" href="group__Text.html#g84ecf6d5f5b363d7715e15eca8ebafeb" title="Equivalent to:.">allegro_gl_printf()</a> </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00645">645</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l00685">allegro_gl_convert_allegro_font_ex()</a>, <a class="el" href="aglf_8c-source.html#l00573">allegro_gl_destroy_font()</a>, <a class="el" href="aglf_8c-source.html#l00485">allegro_gl_load_system_font()</a>, and <a class="el" href="aglf_8c-source.html#l00169">allegro_gl_printf_ex()</a>.
</div>
</div><p>
<a class="anchor" name="g92bf039bc7b06568273ee17f15cf6671"></a><!-- doxytag: member="alleggl.h::AGL_FONT_TYPE_TEXTURED" ref="g92bf039bc7b06568273ee17f15cf6671" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_TYPE_TEXTURED&nbsp;&nbsp;&nbsp;2          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Indicates that you want fonts to be converted to a texture format. 
<p>
Each character is represented by a textured quad. The texture is common for all characters of the same font, and it will automatically be uploaded to the video card when needed. Drawing text with this type of font is the fastest since only two triangles are needed per character. Textured text can also be scaled and rotated. A display list will be created.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__Text.html#gd01388c5188ae09628284aa2425acae9" title="Equivalent to:.">allegro_gl_convert_allegro_font()</a>, <a class="el" href="group__Text.html#g84ecf6d5f5b363d7715e15eca8ebafeb" title="Equivalent to:.">allegro_gl_printf()</a> </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00657">657</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l00143">agl_char_length_fractional()</a>, <a class="el" href="fontconv_8c-source.html#l00444">agl_extract_font_range()</a>, <a class="el" href="fontconv_8c-source.html#l00526">agl_merge_fonts()</a>, <a class="el" href="fontconv_8c-source.html#l01525">aglf_convert_allegro_font_to_texture()</a>, <a class="el" href="fontconv_8c-source.html#l00685">allegro_gl_convert_allegro_font_ex()</a>, <a class="el" href="aglf_8c-source.html#l00573">allegro_gl_destroy_font()</a>, <a class="el" href="aglf_8c-source.html#l00169">allegro_gl_printf_ex()</a>, and <a class="el" href="fontconv_8c-source.html#l00360">copy_glyph_range()</a>.
</div>
</div><p>
<a class="anchor" name="gb77d7d2c6ec6d1786472943f7cd814ca"></a><!-- doxytag: member="alleggl.h::AGL_FONT_STYLE_BOLD" ref="gb77d7d2c6ec6d1786472943f7cd814ca" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_STYLE_BOLD&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a font with bold characters. 
<p>
System fonts only.<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00665">665</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="g27874c1fb7fdc1e00115bd853c973fc3"></a><!-- doxytag: member="alleggl.h::AGL_FONT_STYLE_BLACK" ref="g27874c1fb7fdc1e00115bd853c973fc3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_STYLE_BLACK&nbsp;&nbsp;&nbsp;2          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a font with black (strong bold) characters. 
<p>
System fonts only. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL. </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00670">670</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="g67c48bf08c2b6cd6cc1a08dec2c7c5ef"></a><!-- doxytag: member="alleggl.h::AGL_FONT_STYLE_ITALIC" ref="g67c48bf08c2b6cd6cc1a08dec2c7c5ef" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_STYLE_ITALIC&nbsp;&nbsp;&nbsp;4          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a font with italicized characters. 
<p>
System fonts only. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL. </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00675">675</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="ge9e4682339d264429ee601c632231c9f"></a><!-- doxytag: member="alleggl.h::AGL_FONT_STYLE_UNDERLINE" ref="ge9e4682339d264429ee601c632231c9f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_STYLE_UNDERLINE&nbsp;&nbsp;&nbsp;8          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a font with underlined characters. 
<p>
System fonts only. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL. </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00680">680</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="g6ba31b9c7866d28b5494fad2577569db"></a><!-- doxytag: member="alleggl.h::AGL_FONT_STYLE_STRIKEOUT" ref="g6ba31b9c7866d28b5494fad2577569db" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_STYLE_STRIKEOUT&nbsp;&nbsp;&nbsp;16          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a font with striked out characters. 
<p>
System fonts only. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL. </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00685">685</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="g91cc859278878dd4bf200bed7eab4359"></a><!-- doxytag: member="alleggl.h::AGL_FONT_STYLE_ANTI_ALIASED" ref="g91cc859278878dd4bf200bed7eab4359" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_STYLE_ANTI_ALIASED&nbsp;&nbsp;&nbsp;32          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a font with anti-aliased characters. 
<p>
System fonts only. Anti-aliasing may not be available, and no error will be reported if such is the case. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000008">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL. </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00692">692</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="g4b45ef558e7934ceaaff146f450ab23f"></a><!-- doxytag: member="alleggl.h::AGL_FONT_POLYGONS" ref="g4b45ef558e7934ceaaff146f450ab23f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_POLYGONS&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Font generation mode. 
<p>
System fonts only. Indicates that you want outline system fonts to be generated using polygons. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000009">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__Text.html#g5bddcc6c1954665140083928117519de" title="Short hand for aglf_load_system_font_ex(name, AGL_FONT_TYPE_OUTLINE, style, w, h...">allegro_gl_load_system_font()</a>, <a class="el" href="group__Text.html#g4ad68c54b0183c60cdbf2c7a02dc3157" title="Loads a system font.">allegro_gl_load_system_font_ex()</a> </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00700">700</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<a class="anchor" name="g0b426eb30e7203eb094a7adfbb04cb6d"></a><!-- doxytag: member="alleggl.h::AGL_FONT_LINES" ref="g0b426eb30e7203eb094a7adfbb04cb6d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_FONT_LINES&nbsp;&nbsp;&nbsp;2          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Font generation mode. 
<p>
System fonts only. Indicates that you want outline system fonts to be generated using lines. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000010">Deprecated:</a></b></dt><dd>Non-textured fonts will be dropped from AllegroGL.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__Text.html#g5bddcc6c1954665140083928117519de" title="Short hand for aglf_load_system_font_ex(name, AGL_FONT_TYPE_OUTLINE, style, w, h...">allegro_gl_load_system_font()</a>, <a class="el" href="group__Text.html#g4ad68c54b0183c60cdbf2c7a02dc3157" title="Loads a system font.">allegro_gl_load_system_font_ex()</a> </dd></dl>

<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00709">709</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g84ecf6d5f5b363d7715e15eca8ebafeb"></a><!-- doxytag: member="alleggl.h::allegro_gl_printf" ref="g84ecf6d5f5b363d7715e15eca8ebafeb" args="(AL_CONST FONT *f, float x, float y, float z, int color, AL_CONST char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_printf           </td>
          <td>(</td>
          <td class="paramtype">AL_CONST FONT *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>color</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Equivalent to:. 
<p>
<pre>
   r = getr(color);
   g = getg(color);
   b = getb(color);
   a = geta(color);
   glColor4f(r, g, b, a);
   allegro_gl_printf_ex(f, x, y, z,
                        format, ...);
  </pre><p>
Note that the current primary color is not preserved. 
<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00067">67</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00023">__allegro_gl_use_alpha</a>, <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, and <a class="el" href="aglf_8c-source.html#l00169">allegro_gl_printf_ex()</a>.
</div>
</div><p>
<a class="anchor" name="gb93317445f8a566f8b5632e04fbf8e5b"></a><!-- doxytag: member="alleggl.h::allegro_gl_printf_ex" ref="gb93317445f8a566f8b5632e04fbf8e5b" args="(AL_CONST FONT *f, float x, float y, float z, AL_CONST char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_printf_ex           </td>
          <td>(</td>
          <td class="paramtype">AL_CONST FONT *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Prints a formatted string (printf style) on the screen. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>f</em>&nbsp;</td><td>Which font to use. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x,y,z</em>&nbsp;</td><td>Coordinates to print at. They specify the top-left corner of the text position. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>The format string (see printf() for details)</td></tr>
  </table>
</dl>
For bitmap fonts, the raster position is set to (x,y), 'z' is ignored. The current modelview matrix applies to this code so you may want to use glLoadIdentity() beforehand. On the other hand, you can use the modelview matrix to apply transformations to the text. This will only work with textured or vector (outline) fonts. This function only accepts AllegroGL formated fonts, as converted by <a class="el" href="group__Text.html#gd01388c5188ae09628284aa2425acae9" title="Equivalent to:.">allegro_gl_convert_allegro_font()</a>, or loaded by <a class="el" href="group__Text.html#g5bddcc6c1954665140083928117519de" title="Short hand for aglf_load_system_font_ex(name, AGL_FONT_TYPE_OUTLINE, style, w, h...">allegro_gl_load_system_font()</a> or <a class="el" href="group__Text.html#g4ad68c54b0183c60cdbf2c7a02dc3157" title="Loads a system font.">allegro_gl_load_system_font_ex()</a>.<p>
Texturing must be enabled for this function to work with <a class="el" href="group__Text.html#g92bf039bc7b06568273ee17f15cf6671" title="Indicates that you want fonts to be converted to a texture format.">AGL_FONT_TYPE_TEXTURED</a> fonts.<p>
Remember to use <code>glEnable(GL_TEXTURE_2D)</code> to enable texturing.<p>
The resulting size may not be what you expect. For bitmaped fonts, there is nothing you can do about this appart changing the font itself. Textured and Vector fonts are more flexible, in that you can use glScale to adjust the size of the characters.<p>
If you need to draw the text without the black backround, we suggest you set up a proper blending mode prior to drawing the text, such as: <pre>
     glEnable(GL_BLEND);
     glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
   </pre><p>
If you want to emulate the Allegro drawing mode (no blending at all), then you should use the folowing code instead:<p>
<pre>
     glDisable(GL_DEPTH_TEST);
     glEnable(GL_BLEND);</pre><p>
<pre>     glBlendFunc(GL_DST_COLOR, GL_ZERO);
     <a class="el" href="group__Text.html#g84ecf6d5f5b363d7715e15eca8ebafeb" title="Equivalent to:.">allegro_gl_printf()</a>;</pre><p>
<pre>     glBlendFunc(GL_ONE, GL_ONE);
     <a class="el" href="group__Text.html#g84ecf6d5f5b363d7715e15eca8ebafeb" title="Equivalent to:.">allegro_gl_printf()</a>;    // Same as the one above!</pre><p>
<pre>     glEnable(GL_DEPTH_TEST);
   </pre><p>
Have a look at NeHe's Tutorial #20 for details on this technique. <a href="http://nehe.gamedev.net/">http://nehe.gamedev.net/</a><p>
The most flexible way to use fonts, though, is to use alpha textures based on a greyscale font. Set the texture format to <code>GL_ALPHA4</code> or <code>GL_ALPHA8</code> before creating the (textured) font. Then you can set the colour and blend modes like so:<p>
<pre>
    glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    allegro_gl_printf_ex(my_font, x, y, z, "Hi!")
  </pre><p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of characters printed. </dd></dl>

<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00169">169</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, <a class="el" href="alleggl_8h-source.html#l00633">AGL_FONT_TYPE_BITMAP</a>, <a class="el" href="alleggl_8h-source.html#l00645">AGL_FONT_TYPE_OUTLINE</a>, <a class="el" href="alleggl_8h-source.html#l00657">AGL_FONT_TYPE_TEXTURED</a>, <a class="el" href="aglf_8c-source.html#l00038">find_range()</a>, <a class="el" href="fontconv_8c-source.html#l00082">font_vtable_agl</a>, and <a class="el" href="aglf_8c-source.html#l00028">PREFIX_E</a>.
<p>
Referenced by <a class="el" href="aglf_8c-source.html#l00067">allegro_gl_printf()</a>.
</div>
</div><p>
<a class="anchor" name="gd01388c5188ae09628284aa2425acae9"></a><!-- doxytag: member="alleggl.h::allegro_gl_convert_allegro_font" ref="gd01388c5188ae09628284aa2425acae9" args="(FONT *f, int type, float scale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FONT* allegro_gl_convert_allegro_font           </td>
          <td>(</td>
          <td class="paramtype">FONT *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>scale</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Equivalent to:. 
<p>
<pre>
   allegro_gl_convert_allegro_font_ex(f, type, scale, format_state);
 </pre><p>
Where format_state is the last specified format to <a class="el" href="group__texture.html#g5d535e8af776dd449cc4755b9e3585b1" title="Sets the color format you'd like OpenGL to use for its textures.">allegro_gl_set_texture_format()</a>. If <a class="el" href="group__texture.html#g5d535e8af776dd449cc4755b9e3585b1" title="Sets the color format you'd like OpenGL to use for its textures.">allegro_gl_set_texture_format()</a> was not previously called, AllegroGL will try to determine the texture format automatically.<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000014">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="fontconv_8c-source.html#l00623">623</a> of file <a class="el" href="fontconv_8c-source.html">fontconv.c</a>.
<p>
References <a class="el" href="fontconv_8c-source.html#l00685">allegro_gl_convert_allegro_font_ex()</a>, and <a class="el" href="texture_8c-source.html#l00248">allegro_gl_get_texture_format()</a>.
</div>
</div><p>
<a class="anchor" name="g4986ec80f1a3362e47f7669461fef414"></a><!-- doxytag: member="alleggl.h::allegro_gl_convert_allegro_font_ex" ref="g4986ec80f1a3362e47f7669461fef414" args="(FONT *f, int type, float scale, GLint format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FONT* allegro_gl_convert_allegro_font_ex           </td>
          <td>(</td>
          <td class="paramtype">FONT *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GLint&nbsp;</td>
          <td class="paramname"> <em>format</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Converts a regular Allegro FONT to the AGL format for 3D display. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>f</em>&nbsp;</td><td>The Allegro font to convert. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The font type to convert to. (see <a class="el" href="group__Text.html#gd2ebae17d2548a5befb888f8618f2206" title="Indicates that you don't really care how a font will be converted.">AGL_FONT_TYPE_DONT_CARE</a>, <a class="el" href="group__Text.html#g7ed8fdc1b0065d2fe584b15d69108b1a" title="Indicates that you want fonts to be converted to a bitmap format.">AGL_FONT_TYPE_BITMAP</a>, <a class="el" href="group__Text.html#g92bf039bc7b06568273ee17f15cf6671" title="Indicates that you want fonts to be converted to a texture format.">AGL_FONT_TYPE_TEXTURED</a>) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>scale</em>&nbsp;</td><td>The scaling factor (see below). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>The texture internal format to use.</td></tr>
  </table>
</dl>
This function will build a texture map and/or a display list that will be automatically uploaded to the video card. You can only convert to bitmap or textured fonts.<p>
You can't convert an Allegro font to a vector font (<a class="el" href="group__Text.html#gba7b8c941356029687ff4b4340e8b841" title="Indicates that you want fonts to be converted to an outline format.">AGL_FONT_TYPE_OUTLINE</a>) as the logistics of such an operation are quite complex. The original font will NOT be modified.<p>
A valid OpenGL rendering context is required, so you may only call this function after a successful call to set_gfx_mode() with a valid OpenGL mode.<p>
You should destroy the font via <a class="el" href="group__Text.html#gbcbdd9810f7254cdb105f987ae1e557f" title="Destroys the font.">allegro_gl_destroy_font()</a> when you are done with it.<p>
<b>Scaling</b><p>
For <a class="el" href="group__Text.html#g92bf039bc7b06568273ee17f15cf6671" title="Indicates that you want fonts to be converted to a texture format.">AGL_FONT_TYPE_TEXTURED</a> fonts, glyphs in the font need to be mapped to OpenGL coordinates. The scale factor ensures that you get the scaling you need. scale reprents the number of pixels to be mapped to 1.0 OpenGL units. For allegro_gl_convert_font() to behave like AllegroGL 0.0.24 and earlier, you'll need to pass 16.0 as the scale factor.<p>
Alternativaly, you can make all your fonts be 1.0 units high by using: <pre>
   allegro_gl_convert_allegro_font(f, <a class="el" href="group__Text.html#g92bf039bc7b06568273ee17f15cf6671" title="Indicates that you want fonts to be converted to a texture format.">AGL_FONT_TYPE_TEXTURED</a>, 1.0/text_height(f));
  </pre><p>
If you are planning to use your fonts on an orthographic projection where one unit maps to one pixel, then you should pass 1.0 as scale.<p>
The scaling factor has no meaning for <a class="el" href="group__Text.html#g7ed8fdc1b0065d2fe584b15d69108b1a" title="Indicates that you want fonts to be converted to a bitmap format.">AGL_FONT_TYPE_BITMAP</a> fonts, so it's ignored if the conversion will lead to a font of that type.<p>
<b>Format</b><p>
The format specifies what internal format OpenGL should use for the texture, in the case of <a class="el" href="group__Text.html#g92bf039bc7b06568273ee17f15cf6671" title="Indicates that you want fonts to be converted to a texture format.">AGL_FONT_TYPE_TEXTURED</a> fonts. It has the same semantics as the internalformat parameter of glTexImage2D(). If you would like for AllegroGL to pick a texture format for you, you may supply -1 as the texture format. The default format for monochrome fonts is GL_INTENSITY4. The default format for colored fonts is GL_RGB8.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The converted font, or NULL on error. </dd></dl>

<p>
Definition at line <a class="el" href="fontconv_8c-source.html#l00685">685</a> of file <a class="el" href="fontconv_8c-source.html">fontconv.c</a>.
<p>
References <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, <a class="el" href="alleggl_8h-source.html#l00633">AGL_FONT_TYPE_BITMAP</a>, <a class="el" href="alleggl_8h-source.html#l00622">AGL_FONT_TYPE_DONT_CARE</a>, <a class="el" href="alleggl_8h-source.html#l00645">AGL_FONT_TYPE_OUTLINE</a>, <a class="el" href="alleggl_8h-source.html#l00657">AGL_FONT_TYPE_TEXTURED</a>, <a class="el" href="fontconv_8c-source.html#l01668">aglf_convert_allegro_font_to_bitmap()</a>, <a class="el" href="fontconv_8c-source.html#l01525">aglf_convert_allegro_font_to_texture()</a>, <a class="el" href="allglint_8h-source.html#l00168">FONT_AGL_DATA::data</a>, <a class="el" href="fontconv_8c-source.html#l00082">font_vtable_agl</a>, <a class="el" href="allglint_8h-source.html#l00175">FONT_AGL_DATA::has_alpha</a>, <a class="el" href="gui_8c-source.html#l00024">height</a>, <a class="el" href="allglint_8h-source.html#l00173">FONT_AGL_DATA::next</a>, <a class="el" href="aglf_8c-source.html#l00028">PREFIX_E</a>, <a class="el" href="alleggl_8c-source.html#l00024">PREFIX_I</a>, <a class="el" href="fontconv_8c-source.html#l00035">PREFIX_W</a>, and <a class="el" href="allglint_8h-source.html#l00161">FONT_AGL_DATA::type</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l00623">allegro_gl_convert_allegro_font()</a>.
</div>
</div><p>
<a class="anchor" name="g62e79ccec5062f1cdadbc225319e9b44"></a><!-- doxytag: member="alleggl.h::allegro_gl_set_font_generation_mode" ref="g62e79ccec5062f1cdadbc225319e9b44" args="(int mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void allegro_gl_set_font_generation_mode           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>mode</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the font generation mode for system fonts. 
<p>
<b>Note:</b> This function is deprecated and will be removed in a future version.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>Can be either <a class="el" href="group__Text.html#g4b45ef558e7934ceaaff146f450ab23f" title="Font generation mode.">AGL_FONT_POLYGONS</a> or <a class="el" href="group__Text.html#g0b426eb30e7203eb094a7adfbb04cb6d" title="Font generation mode.">AGL_FONT_LINES</a>. for creating polygonal or line characters. Default is <a class="el" href="group__Text.html#g4b45ef558e7934ceaaff146f450ab23f" title="Font generation mode.">AGL_FONT_POLYGONS</a>.</td></tr>
  </table>
</dl>
Subsequent calls to <a class="el" href="group__Text.html#g5bddcc6c1954665140083928117519de" title="Short hand for aglf_load_system_font_ex(name, AGL_FONT_TYPE_OUTLINE, style, w, h...">allegro_gl_load_system_font()</a> and <a class="el" href="group__Text.html#g4ad68c54b0183c60cdbf2c7a02dc3157" title="Loads a system font.">allegro_gl_load_system_font_ex()</a> may be affected by this function.<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000011">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00469">469</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="aglf_8c-source.html#l00032">aglf_font_generation_mode</a>.
</div>
</div><p>
<a class="anchor" name="g5bddcc6c1954665140083928117519de"></a><!-- doxytag: member="alleggl.h::allegro_gl_load_system_font" ref="g5bddcc6c1954665140083928117519de" args="(char *name, int style, int w, int h)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FONT* allegro_gl_load_system_font           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>style</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>h</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Short hand for aglf_load_system_font_ex(name, <a class="el" href="group__Text.html#gba7b8c941356029687ff4b4340e8b841" title="Indicates that you want fonts to be converted to an outline format.">AGL_FONT_TYPE_OUTLINE</a>, style, w, h, 0.0f, 32, 256). 
<p>
<b>Note:</b> This function is deprecated and will be removed in a future version.<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000012">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00485">485</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="alleggl_8h-source.html#l00645">AGL_FONT_TYPE_OUTLINE</a>, and <a class="el" href="aglf_8c-source.html#l00526">allegro_gl_load_system_font_ex()</a>.
</div>
</div><p>
<a class="anchor" name="g4ad68c54b0183c60cdbf2c7a02dc3157"></a><!-- doxytag: member="alleggl.h::allegro_gl_load_system_font_ex" ref="g4ad68c54b0183c60cdbf2c7a02dc3157" args="(char *name, int type, int style, int w, int h, float depth, int start, int end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FONT* allegro_gl_load_system_font_ex           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>style</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>depth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>end</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Loads a system font. 
<p>
<b>Note:</b> This function is deprecated and will be removed in a future version.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The name of the system font ("Courrier" or "Arial" for example) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The font type to generate (<a class="el" href="group__Text.html#gd2ebae17d2548a5befb888f8618f2206" title="Indicates that you don't really care how a font will be converted.">AGL_FONT_TYPE_DONT_CARE</a>, <a class="el" href="group__Text.html#g7ed8fdc1b0065d2fe584b15d69108b1a" title="Indicates that you want fonts to be converted to a bitmap format.">AGL_FONT_TYPE_BITMAP</a>, <a class="el" href="group__Text.html#gba7b8c941356029687ff4b4340e8b841" title="Indicates that you want fonts to be converted to an outline format.">AGL_FONT_TYPE_OUTLINE</a>) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>style</em>&nbsp;</td><td>The text decorations of the font to create (<a class="el" href="group__Text.html#g67c48bf08c2b6cd6cc1a08dec2c7c5ef" title="Creates a font with italicized characters.">AGL_FONT_STYLE_ITALIC</a>, etc - can be or'ed together) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>w,h</em>&nbsp;</td><td>The size of the font characters that will be created. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>depth</em>&nbsp;</td><td>The z-depth of the font. 0.0f is flat, 1.0f is very thick </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start,end</em>&nbsp;</td><td>The range of characters to create from 'start' (included) to 'end' (excluded) in UTF-8 format (ANSI only on Windows).</td></tr>
  </table>
</dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd><ul>
<li>In <a class="el" href="group__Text.html#gba7b8c941356029687ff4b4340e8b841" title="Indicates that you want fonts to be converted to an outline format.">AGL_FONT_TYPE_OUTLINE</a> type, some system fonts seem to be unresponsive to the size paramaters (w and h). You cannot depend on either a system font being present, or the font being what you expect - it is possible to have two fonts with the same name but with different graphic data.</li><li>BITMAP fonts have no depth.</li><li>The width and height parameters are also system dependent, and may or may not work with the selected font.</li></ul>
</dd></dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The loaded font, or NULL on error.</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000013">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00526">526</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, and <a class="el" href="aglf_8c-source.html#l00028">PREFIX_E</a>.
<p>
Referenced by <a class="el" href="aglf_8c-source.html#l00485">allegro_gl_load_system_font()</a>.
</div>
</div><p>
<a class="anchor" name="gbcbdd9810f7254cdb105f987ae1e557f"></a><!-- doxytag: member="alleggl.h::allegro_gl_destroy_font" ref="gbcbdd9810f7254cdb105f987ae1e557f" args="(FONT *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void allegro_gl_destroy_font           </td>
          <td>(</td>
          <td class="paramtype">FONT *&nbsp;</td>
          <td class="paramname"> <em>f</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroys the font. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>f</em>&nbsp;</td><td>The AGL font to be destroyed.</td></tr>
  </table>
</dl>
The allocated memory is freed, as well as any display list, or texture objects it uses.<p>
You cannot use that font anymore after calling this function. It's safe to call this function with a NULL pointer; a note will be placed in allegro.log if DEBUGMODE was defined.<p>
If NULL is passed as the font to destroy, then this function returns immediately. 
<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00573">573</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, <a class="el" href="alleggl_8h-source.html#l00633">AGL_FONT_TYPE_BITMAP</a>, <a class="el" href="alleggl_8h-source.html#l00645">AGL_FONT_TYPE_OUTLINE</a>, <a class="el" href="alleggl_8h-source.html#l00657">AGL_FONT_TYPE_TEXTURED</a>, <a class="el" href="allglint_8h-source.html#l00168">FONT_AGL_DATA::data</a>, <a class="el" href="allglint_8h-source.html#l00162">FONT_AGL_DATA::end</a>, <a class="el" href="fontconv_8c-source.html#l00082">font_vtable_agl</a>, <a class="el" href="allglint_8h-source.html#l00169">FONT_AGL_DATA::glyph_coords</a>, <a class="el" href="allglint_8h-source.html#l00163">FONT_AGL_DATA::is_free_chunk</a>, <a class="el" href="allglint_8h-source.html#l00170">FONT_AGL_DATA::list_base</a>, <a class="el" href="allglint_8h-source.html#l00173">FONT_AGL_DATA::next</a>, <a class="el" href="aglf_8c-source.html#l00028">PREFIX_E</a>, <a class="el" href="allglint_8h-source.html#l00162">FONT_AGL_DATA::start</a>, <a class="el" href="allglint_8h-source.html#l00171">FONT_AGL_DATA::texture</a>, and <a class="el" href="allglint_8h-source.html#l00161">FONT_AGL_DATA::type</a>.
</div>
</div><p>
<a class="anchor" name="g70b78c3a523dc9977c222d466edc6a5a"></a><!-- doxytag: member="alleggl.h::allegro_gl_list_font_textures" ref="g70b78c3a523dc9977c222d466edc6a5a" args="(FONT *f, GLuint *ids, size_t max_num_id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t allegro_gl_list_font_textures           </td>
          <td>(</td>
          <td class="paramtype">FONT *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GLuint *&nbsp;</td>
          <td class="paramname"> <em>ids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>max_num_id</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
List the texture ID of all textures forming the specified font. 
<p>
The font specified must be an AllegroGL font.<p>
If ids is not NULL, then the ID numbers of all textures used by the font are written to the GLuint array pointed by ids. The size of that array is specified by the max_num_id parameter. This function will never write more than 'max_num_id' values in the ids array.<p>
If f is NULL, then zero is returned and the ids array is never touched.<p>
If the font does not contain any textures (because it is a bitmap or outline font, for example), then zero is returned.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of texture IDs that make up this font.</dd></dl>
Here are two examples of the use of this function:<p>
<pre>
   int num_ids = allegro_gl_list_font_textures(font, NULL, 0);</pre><p>
<pre>   GLuint *id = malloc(sizeof(GLuint) * num_ids);</pre><p>
<pre>   if (!id) {
     //handle error
   }</pre><p>
<pre>   allegro_gl_list_font_textures(font, id, num_ids);</pre><p>
<pre>   for (i = 0; i &lt; num_ids; i++) {
       glBindTexture(GL_TEXTURE_2D, id[i]);
       // Use this texture
   }</pre><p>
<pre>   free(id);
 </pre><p>
<pre>
   GLint id[10];  // Reserve a safe number
   GLint num_ids = allegro_gl_list_font_textures(font, id, 10);
 </pre> 
<p>
Definition at line <a class="el" href="aglf_8c-source.html#l00689">689</a> of file <a class="el" href="aglf_8c-source.html">aglf.c</a>.
<p>
References <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, <a class="el" href="allglint_8h-source.html#l00168">FONT_AGL_DATA::data</a>, <a class="el" href="fontconv_8c-source.html#l00082">font_vtable_agl</a>, <a class="el" href="allglint_8h-source.html#l00173">FONT_AGL_DATA::next</a>, <a class="el" href="aglf_8c-source.html#l00028">PREFIX_E</a>, and <a class="el" href="allglint_8h-source.html#l00171">FONT_AGL_DATA::texture</a>.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 12 11:05:32 2007 for AllegroGL by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>