Sophie

Sophie

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

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: Texture Routines</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>Texture Routines</h1>AllegroGL provides functions to allow using Allegro BITMAP objects to be used as OpenGL textures.  
<a href="#_details">More...</a><h2>Texture routines</h2>
<ul>
<li>int <a class="el" href="group__texture.html#gb5393ecc10a2a31da7eb80c889af89ac">allegro_gl_use_mipmapping</a> (int enable)
<dl class="el"><dd class="mdescRight">Tell AllegroGL to use Mipmapping or not when generating textures via its functions.  <a href="#gb5393ecc10a2a31da7eb80c889af89ac"></a><br></dl><li>int <a class="el" href="group__texture.html#g1d88f4ebc7ed1ecd65640b72ea46a71e">allegro_gl_use_alpha_channel</a> (int enable)
<dl class="el"><dd class="mdescRight">Tell AllegroGL to use Alpha channel or not when generating textures via its functions.  <a href="#g1d88f4ebc7ed1ecd65640b72ea46a71e"></a><br></dl><li>int <a class="el" href="group__texture.html#g3ec0a1c4c6656f13c8398bab7a1293f2">allegro_gl_flip_texture</a> (int enable)
<dl class="el"><dd class="mdescRight">Tell AllegroGL to flip the texture vertically or not when generating textures via its functions, to conform to the usual OpenGL texture coordinate system (increasing upwards).  <a href="#g3ec0a1c4c6656f13c8398bab7a1293f2"></a><br></dl><li>int <a class="el" href="group__texture.html#g6996c14538e18b1614f91d34b2d4d691">allegro_gl_check_texture</a> (BITMAP *bmp)
<dl class="el"><dd class="mdescRight">Checks whether the specified bitmap is of the proper size for texturing.  <a href="#g6996c14538e18b1614f91d34b2d4d691"></a><br></dl><li>int <a class="el" href="group__texture.html#gb0cf4dc0ddcb45f5b067d08aed1c88e6">allegro_gl_check_texture_ex</a> (int flags, BITMAP *bmp, GLint internal_format)
<dl class="el"><dd class="mdescRight">Checks whether the specified bitmap is of the proper size for texturing.  <a href="#gb0cf4dc0ddcb45f5b067d08aed1c88e6"></a><br></dl><li>GLint <a class="el" href="group__texture.html#g2392fe7a8dd6db65532160821804aa68">allegro_gl_get_texture_format</a> (BITMAP *bmp)
<dl class="el"><dd class="mdescRight">Returns the OpenGL internal texture format for this bitmap.  <a href="#g2392fe7a8dd6db65532160821804aa68"></a><br></dl><li>GLint <a class="el" href="group__texture.html#g5d535e8af776dd449cc4755b9e3585b1">allegro_gl_set_texture_format</a> (GLint format)
<dl class="el"><dd class="mdescRight">Sets the color format you'd like OpenGL to use for its textures.  <a href="#g5d535e8af776dd449cc4755b9e3585b1"></a><br></dl><li><a class="anchor" name="g59f7129dd541d2e5a291d36bf90b7289"></a><!-- doxytag: member="texture::allegro_gl_get_bitmap_type" ref="g59f7129dd541d2e5a291d36bf90b7289" args="(BITMAP *bmp)" -->
GLenum <a class="el" href="group__texture.html#g59f7129dd541d2e5a291d36bf90b7289">allegro_gl_get_bitmap_type</a> (BITMAP *bmp)
<dl class="el"><dd class="mdescRight">AllegroGL will generate mipmaps for this texture. <br></dl><li><a class="anchor" name="g83b2b13cb35dd4b4e9e874173a246581"></a><!-- doxytag: member="texture::allegro_gl_get_bitmap_color_format" ref="g83b2b13cb35dd4b4e9e874173a246581" args="(BITMAP *bmp)" -->
GLenum <a class="el" href="group__texture.html#g83b2b13cb35dd4b4e9e874173a246581">allegro_gl_get_bitmap_color_format</a> (BITMAP *bmp)
<dl class="el"><dd class="mdescRight">AllegroGL will generate mipmaps for this texture. <br></dl><li>GLuint <a class="el" href="group__texture.html#ge071354f76bc28e1bafbd90bdecbc0c9">allegro_gl_make_texture</a> (BITMAP *bmp)
<dl class="el"><dd class="mdescRight">Uploads an Allegro BITMAP to the GL driver as a texture.  <a href="#ge071354f76bc28e1bafbd90bdecbc0c9"></a><br></dl><li>GLuint <a class="el" href="group__texture.html#geb33dfbbc1725f5132c10ac32ef6800d">allegro_gl_make_masked_texture</a> (BITMAP *bmp)
<dl class="el"><dd class="mdescRight">Uploads an Allegro BITMAP to the GL driver as a texture.  <a href="#geb33dfbbc1725f5132c10ac32ef6800d"></a><br></dl><li>GLuint <a class="el" href="group__texture.html#gf3a48c555068e7051171255c1011150a">allegro_gl_make_texture_ex</a> (int flags, BITMAP *bmp, GLint internal_format)
<dl class="el"><dd class="mdescRight">Uploads an Allegro BITMAP to the GL driver as a texture.  <a href="#gf3a48c555068e7051171255c1011150a"></a><br></dl><li><a class="anchor" name="gbaf179e577a9328a751e92e3603f0746"></a><!-- doxytag: member="texture::AGL_TEXTURE_MIPMAP" ref="gbaf179e577a9328a751e92e3603f0746" args="" -->
#define <a class="el" href="group__texture.html#gbaf179e577a9328a751e92e3603f0746">AGL_TEXTURE_MIPMAP</a>&nbsp;&nbsp;&nbsp;0x01
<dl class="el"><dd class="mdescRight">AllegroGL will generate mipmaps for this texture. <br></dl><li><a class="anchor" name="g8cc859eadf1610b424cd9188e716f432"></a><!-- doxytag: member="texture::AGL_TEXTURE_HAS_ALPHA" ref="g8cc859eadf1610b424cd9188e716f432" args="" -->
#define <a class="el" href="group__texture.html#g8cc859eadf1610b424cd9188e716f432">AGL_TEXTURE_HAS_ALPHA</a>&nbsp;&nbsp;&nbsp;0x02
<dl class="el"><dd class="mdescRight">Tell AllegroGL that the bitmap had an alpha channel, so it should be preserved when generating the texture. <br></dl><li>#define <a class="el" href="group__texture.html#gdeffe4feb290278035beacedb284a010">AGL_TEXTURE_FLIP</a>&nbsp;&nbsp;&nbsp;0x04
<dl class="el"><dd class="mdescRight">Flip the texture on the x-axis.  <a href="#gdeffe4feb290278035beacedb284a010"></a><br></dl><li>#define <a class="el" href="group__texture.html#gba184d573c65f33b35d1d57936607d08">AGL_TEXTURE_MASKED</a>&nbsp;&nbsp;&nbsp;0x08
<dl class="el"><dd class="mdescRight">Generate an alpha channel for this texture, based on the Allegro mask color.  <a href="#gba184d573c65f33b35d1d57936607d08"></a><br></dl><li>#define <a class="el" href="group__texture.html#ga8b7246edc7ec019ec3b434eb0cacdf2">AGL_TEXTURE_RESCALE</a>&nbsp;&nbsp;&nbsp;0x10
<dl class="el"><dd class="mdescRight">Tell AllegroGL to allow rescaling of the bitmap.  <a href="#ga8b7246edc7ec019ec3b434eb0cacdf2"></a><br></dl><li><a class="anchor" name="gd67cfdfd21ef2cae75b03cb871e57f4a"></a><!-- doxytag: member="texture::AGL_TEXTURE_ALPHA_ONLY" ref="gd67cfdfd21ef2cae75b03cb871e57f4a" args="" -->
#define <a class="el" href="group__texture.html#gd67cfdfd21ef2cae75b03cb871e57f4a">AGL_TEXTURE_ALPHA_ONLY</a>&nbsp;&nbsp;&nbsp;0x20
<dl class="el"><dd class="mdescRight">Tell AllegroGL that the specified BITMAP is an 8-bpp alpha-only BITMAP. <br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
AllegroGL provides functions to allow using Allegro BITMAP objects to be used as OpenGL textures. 
<p>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="gdeffe4feb290278035beacedb284a010"></a><!-- doxytag: member="alleggl.h::AGL_TEXTURE_FLIP" ref="gdeffe4feb290278035beacedb284a010" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_TEXTURE_FLIP&nbsp;&nbsp;&nbsp;0x04          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Flip the texture on the x-axis. 
<p>
OpenGL uses the bottom-left corner of the texture as (0,0), so if you need your texture to be flipped to make (0,0) the top-left corner, you need to use this flag. 
<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00533">533</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="texture_8c-source.html#l00505">__allegro_gl_convert_flags()</a>, <a class="el" href="texture_8c-source.html#l00596">__allegro_gl_munge_bitmap()</a>, <a class="el" href="fontconv_8c-source.html#l01797">aglf_check_texture()</a>, <a class="el" href="fontconv_8c-source.html#l01823">aglf_upload_texture()</a>, <a class="el" href="texture_8c-source.html#l01165">allegro_gl_make_texture_ex()</a>, and <a class="el" href="gui_8c-source.html#l00538">allegro_gl_set_mouse_sprite()</a>.
</div>
</div><p>
<a class="anchor" name="gba184d573c65f33b35d1d57936607d08"></a><!-- doxytag: member="alleggl.h::AGL_TEXTURE_MASKED" ref="gba184d573c65f33b35d1d57936607d08" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_TEXTURE_MASKED&nbsp;&nbsp;&nbsp;0x08          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Generate an alpha channel for this texture, based on the Allegro mask color. 
<p>
Make sure the target format supports an alpha channel. 
<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00538">538</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="texture_8c-source.html#l00596">__allegro_gl_munge_bitmap()</a>, <a class="el" href="fontconv_8c-source.html#l01797">aglf_check_texture()</a>, <a class="el" href="fontconv_8c-source.html#l01823">aglf_upload_texture()</a>, <a class="el" href="texture_8c-source.html#l01402">allegro_gl_make_masked_texture()</a>, <a class="el" href="texture_8c-source.html#l01165">allegro_gl_make_texture_ex()</a>, <a class="el" href="gui_8c-source.html#l00538">allegro_gl_set_mouse_sprite()</a>, and <a class="el" href="glvtable_8c-source.html#l00997">screen_masked_blit_standard()</a>.
</div>
</div><p>
<a class="anchor" name="ga8b7246edc7ec019ec3b434eb0cacdf2"></a><!-- doxytag: member="alleggl.h::AGL_TEXTURE_RESCALE" ref="ga8b7246edc7ec019ec3b434eb0cacdf2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGL_TEXTURE_RESCALE&nbsp;&nbsp;&nbsp;0x10          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tell AllegroGL to allow rescaling of the bitmap. 
<p>
By default, AllegroGL will not rescale the bitmap to fit into a texture. You can override this behavior by using this flag. 
<p>
Definition at line <a class="el" href="alleggl_8h-source.html#l00544">544</a> of file <a class="el" href="alleggl_8h-source.html">alleggl.h</a>.
<p>
Referenced by <a class="el" href="texture_8c-source.html#l00505">__allegro_gl_convert_flags()</a>, <a class="el" href="texture_8c-source.html#l00596">__allegro_gl_munge_bitmap()</a>, <a class="el" href="texture_8c-source.html#l01165">allegro_gl_make_texture_ex()</a>, and <a class="el" href="gui_8c-source.html#l00538">allegro_gl_set_mouse_sprite()</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gb5393ecc10a2a31da7eb80c889af89ac"></a><!-- doxytag: member="alleggl.h::allegro_gl_use_mipmapping" ref="gb5393ecc10a2a31da7eb80c889af89ac" args="(int enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_use_mipmapping           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>enable</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tell AllegroGL to use Mipmapping or not when generating textures via its functions. 
<p>
This will not affect outside OpenGL states. Default is FALSE (off).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#g6996c14538e18b1614f91d34b2d4d691" title="Checks whether the specified bitmap is of the proper size for texturing.">allegro_gl_check_texture()</a>, <a class="el" href="group__texture.html#ge071354f76bc28e1bafbd90bdecbc0c9" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture()</a> <a class="el" href="group__texture.html#geb33dfbbc1725f5132c10ac32ef6800d" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_masked_texture()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>enable</em>&nbsp;</td><td>Set to TRUE to enable mipmapping, FALSE otherwise. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The previous mode (either TRUE or FALSE).</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000017">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00415">415</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00022">allegro_gl_use_mipmapping_for_textures</a>.
</div>
</div><p>
<a class="anchor" name="g1d88f4ebc7ed1ecd65640b72ea46a71e"></a><!-- doxytag: member="alleggl.h::allegro_gl_use_alpha_channel" ref="g1d88f4ebc7ed1ecd65640b72ea46a71e" args="(int enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_use_alpha_channel           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>enable</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tell AllegroGL to use Alpha channel or not when generating textures via its functions. 
<p>
This will not affect outside OpenGL states. Default is FALSE (off).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#g6996c14538e18b1614f91d34b2d4d691" title="Checks whether the specified bitmap is of the proper size for texturing.">allegro_gl_check_texture()</a>, <a class="el" href="group__texture.html#ge071354f76bc28e1bafbd90bdecbc0c9" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture()</a>, <a class="el" href="group__texture.html#geb33dfbbc1725f5132c10ac32ef6800d" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_masked_texture()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>enable</em>&nbsp;</td><td>Set to TRUE to enable textures with alpha channel, FALSE otherwise. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The previous mode (either TRUE or FALSE).</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000018">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00439">439</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00023">__allegro_gl_use_alpha</a>.
</div>
</div><p>
<a class="anchor" name="g3ec0a1c4c6656f13c8398bab7a1293f2"></a><!-- doxytag: member="alleggl.h::allegro_gl_flip_texture" ref="g3ec0a1c4c6656f13c8398bab7a1293f2" args="(int enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_flip_texture           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>enable</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tell AllegroGL to flip the texture vertically or not when generating textures via its functions, to conform to the usual OpenGL texture coordinate system (increasing upwards). 
<p>
Default is TRUE (on).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#g6996c14538e18b1614f91d34b2d4d691" title="Checks whether the specified bitmap is of the proper size for texturing.">allegro_gl_check_texture()</a>, <a class="el" href="group__texture.html#ge071354f76bc28e1bafbd90bdecbc0c9" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture()</a>, <a class="el" href="group__texture.html#geb33dfbbc1725f5132c10ac32ef6800d" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_masked_texture()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>enable</em>&nbsp;</td><td>Set to TRUE to enable textures with alpha channel, FALSE otherwise. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The previous mode (either TRUE or FALSE).</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000019">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00464">464</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00024">__allegro_gl_flip_texture</a>.
</div>
</div><p>
<a class="anchor" name="g6996c14538e18b1614f91d34b2d4d691"></a><!-- doxytag: member="alleggl.h::allegro_gl_check_texture" ref="g6996c14538e18b1614f91d34b2d4d691" args="(BITMAP *bmp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_check_texture           </td>
          <td>(</td>
          <td class="paramtype">BITMAP *&nbsp;</td>
          <td class="paramname"> <em>bmp</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Checks whether the specified bitmap is of the proper size for texturing. 
<p>
This checks for the card's limit on texture sizes.<p>
<b>Important</b> <b>note:</b> allegro_gl_check_texture does not depend on the current state of the texture memory of the driver. This function may return TRUE although there is not enough memory to currently make the texture resident. You may check if the texture is actually resident with glAreTexturesResident().<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#gb0cf4dc0ddcb45f5b067d08aed1c88e6" title="Checks whether the specified bitmap is of the proper size for texturing.">allegro_gl_check_texture_ex()</a>, <a class="el" href="group__texture.html#gf3a48c555068e7051171255c1011150a" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture_ex()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>bmp</em>&nbsp;</td><td>The bitmap to be converted to a texture.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the bitmap can be made a texture of, FALSE otherwise.</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000020">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00557">557</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00505">__allegro_gl_convert_flags()</a>, <a class="el" href="texture_8c-source.html#l00495">allegro_gl_check_texture_ex()</a>, and <a class="el" href="texture_8c-source.html#l00021">allegro_gl_opengl_internal_texture_format</a>.
</div>
</div><p>
<a class="anchor" name="gb0cf4dc0ddcb45f5b067d08aed1c88e6"></a><!-- doxytag: member="alleggl.h::allegro_gl_check_texture_ex" ref="gb0cf4dc0ddcb45f5b067d08aed1c88e6" args="(int flags, BITMAP *bmp, GLint internal_format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int allegro_gl_check_texture_ex           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BITMAP *&nbsp;</td>
          <td class="paramname"> <em>bmp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GLint&nbsp;</td>
          <td class="paramname"> <em>internal_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>
Checks whether the specified bitmap is of the proper size for texturing. 
<p>
This checks for the card's limit on texture sizes.<p>
The parameters to this function are identical to those of <a class="el" href="group__texture.html#gf3a48c555068e7051171255c1011150a" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture_ex()</a>.<p>
<b>Important</b> <b>note:</b> allegro_gl_check_texture does not depend on the current state of the texture memory of the driver. This function may return TRUE although there is not enough memory to currently make the texture resident. You may check if the texture is actually resident with glAreTexturesResident().<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#gf3a48c555068e7051171255c1011150a" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture_ex()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>The bitmap conversion flags. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bmp</em>&nbsp;</td><td>The bitmap to be converted to a texture. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>internal_format</em>&nbsp;</td><td>The internal format to convert to.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the bitmap can be made a texture of, FALSE otherwise. </dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00495">495</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l01165">allegro_gl_make_texture_ex()</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l01797">aglf_check_texture()</a>, and <a class="el" href="texture_8c-source.html#l00557">allegro_gl_check_texture()</a>.
</div>
</div><p>
<a class="anchor" name="g2392fe7a8dd6db65532160821804aa68"></a><!-- doxytag: member="alleggl.h::allegro_gl_get_texture_format" ref="g2392fe7a8dd6db65532160821804aa68" args="(BITMAP *bmp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GLint allegro_gl_get_texture_format           </td>
          <td>(</td>
          <td class="paramtype">BITMAP *&nbsp;</td>
          <td class="paramname"> <em>bmp</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the OpenGL internal texture format for this bitmap. 
<p>
If left to default, it returns the number of color components in the bitmap. Otherwise, it simply returns the user defined value. If the bitmap parameter is NULL, then it returns the currently set format, or -1 if none were previously set. 8 bpp bitmaps are assumed to be alpha channels only (GL_ALPHA8) by default.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><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>, <a class="el" href="group__texture.html#ge071354f76bc28e1bafbd90bdecbc0c9" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>bmp</em>&nbsp;</td><td>The bitmap to get the information of. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The OpenGL internal texture format.</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000015">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00248">248</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00190">__allegro_gl_get_texture_format_ex()</a>, <a class="el" href="texture_8c-source.html#l00023">__allegro_gl_use_alpha</a>, and <a class="el" href="texture_8c-source.html#l00021">allegro_gl_opengl_internal_texture_format</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="g5d535e8af776dd449cc4755b9e3585b1"></a><!-- doxytag: member="alleggl.h::allegro_gl_set_texture_format" ref="g5d535e8af776dd449cc4755b9e3585b1" args="(GLint format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GLint allegro_gl_set_texture_format           </td>
          <td>(</td>
          <td class="paramtype">GLint&nbsp;</td>
          <td class="paramname"> <em>format</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the color format you'd like OpenGL to use for its textures. 
<p>
You can pass any of the available GL_* constants that describe the internal format (GL_ALPHA4...GL_RGBA16). It is recommended that you check for the availability of the format from the client, using <a class="el" href="group__core.html#g444d507eaeb5ba800787f6a81827615d" title="Returns the OpenGL version number of the client (the computer the program is running...">allegro_gl_opengl_version()</a>. No checking will be done as to the validity of the format. The format is a recommendation to the driver, so there is no guarentee that the actual format used will be the one you chose - this is implementation dependant. This call will affect all subsequent calls to <a class="el" href="group__texture.html#ge071354f76bc28e1bafbd90bdecbc0c9" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture()</a> and <a class="el" href="group__texture.html#geb33dfbbc1725f5132c10ac32ef6800d" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_masked_texture()</a>.<p>
To revert to the default AllegroGL format, pass -1 as the format.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#g2392fe7a8dd6db65532160821804aa68" title="Returns the OpenGL internal texture format for this bitmap.">allegro_gl_get_texture_format()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>The OpenGL internal texture format. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The previous value of the texture format.</dd></dl>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000016">Deprecated:</a></b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l00282">282</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00021">allegro_gl_opengl_internal_texture_format</a>.
</div>
</div><p>
<a class="anchor" name="ge071354f76bc28e1bafbd90bdecbc0c9"></a><!-- doxytag: member="alleggl.h::allegro_gl_make_texture" ref="ge071354f76bc28e1bafbd90bdecbc0c9" args="(BITMAP *bmp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GLuint allegro_gl_make_texture           </td>
          <td>(</td>
          <td class="paramtype">BITMAP *&nbsp;</td>
          <td class="paramname"> <em>bmp</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Uploads an Allegro BITMAP to the GL driver as a texture. 
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000021">Deprecated:</a></b></dt><dd></dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#gf3a48c555068e7051171255c1011150a" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture_ex()</a> </dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l01383">1383</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00505">__allegro_gl_convert_flags()</a>, <a class="el" href="texture_8c-source.html#l01165">allegro_gl_make_texture_ex()</a>, and <a class="el" href="texture_8c-source.html#l00021">allegro_gl_opengl_internal_texture_format</a>.
<p>
Referenced by <a class="el" href="glvtable_8c-source.html#l00077">allegro_gl_drawing_mode()</a>.
</div>
</div><p>
<a class="anchor" name="geb33dfbbc1725f5132c10ac32ef6800d"></a><!-- doxytag: member="alleggl.h::allegro_gl_make_masked_texture" ref="geb33dfbbc1725f5132c10ac32ef6800d" args="(BITMAP *bmp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GLuint allegro_gl_make_masked_texture           </td>
          <td>(</td>
          <td class="paramtype">BITMAP *&nbsp;</td>
          <td class="paramname"> <em>bmp</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Uploads an Allegro BITMAP to the GL driver as a texture. 
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000022">Deprecated:</a></b></dt><dd></dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__texture.html#gf3a48c555068e7051171255c1011150a" title="Uploads an Allegro BITMAP to the GL driver as a texture.">allegro_gl_make_texture_ex()</a> </dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l01402">1402</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00505">__allegro_gl_convert_flags()</a>, <a class="el" href="alleggl_8h-source.html#l00538">AGL_TEXTURE_MASKED</a>, <a class="el" href="texture_8c-source.html#l01165">allegro_gl_make_texture_ex()</a>, and <a class="el" href="texture_8c-source.html#l00021">allegro_gl_opengl_internal_texture_format</a>.
</div>
</div><p>
<a class="anchor" name="gf3a48c555068e7051171255c1011150a"></a><!-- doxytag: member="alleggl.h::allegro_gl_make_texture_ex" ref="gf3a48c555068e7051171255c1011150a" args="(int flags, BITMAP *bmp, GLint internal_format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GLuint allegro_gl_make_texture_ex           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BITMAP *&nbsp;</td>
          <td class="paramname"> <em>bmp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GLint&nbsp;</td>
          <td class="paramname"> <em>internal_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>
Uploads an Allegro BITMAP to the GL driver as a texture. 
<p>
The bitmap must be a memory bitmap (note that it can be a subbitmap).<p>
Each bitmap will be converted to a single texture object, with all its size limitations imposed by the video driver and hardware.<p>
The bitmap should conform to the size limitations imposed by the video driver. That is, if ARB_texture_non_power_of_two is not supported, then the BITMAP must be power-of-two sized. Otherwise, AllegroGL will pick the best format for the bitmap.<p>
The original bitmap will NOT be modified.<p>
The flags parameter controls how the texture is generated. It can be a logical OR (|) of any of the following:<p>
<a class="el" href="group__texture.html#gbaf179e577a9328a751e92e3603f0746" title="AllegroGL will generate mipmaps for this texture.">AGL_TEXTURE_MIPMAP</a> <a class="el" href="group__texture.html#g8cc859eadf1610b424cd9188e716f432" title="Tell AllegroGL that the bitmap had an alpha channel, so it should be preserved when...">AGL_TEXTURE_HAS_ALPHA</a> <a class="el" href="group__texture.html#gdeffe4feb290278035beacedb284a010" title="Flip the texture on the x-axis.">AGL_TEXTURE_FLIP</a> <a class="el" href="group__texture.html#gba184d573c65f33b35d1d57936607d08" title="Generate an alpha channel for this texture, based on the Allegro mask color.">AGL_TEXTURE_MASKED</a> <a class="el" href="group__texture.html#ga8b7246edc7ec019ec3b434eb0cacdf2" title="Tell AllegroGL to allow rescaling of the bitmap.">AGL_TEXTURE_RESCALE</a><p>
AllegroGL will create a texture with the specified texel format. The texel format should be any of the valid formats that can be specified to glTexImage2D(). No validity checks will be performed by AllegroGL. If you want AllegroGL to automatically determine the format to use based on the BITMAP, use -1 as the format specifier.<p>
A valid GL Rendering Context must have been established, which means you cannot use this function before having called set_gfx_mode() with a valid OpenGL mode.<p>
<b>Important</b> <b>note:</b> on 32 bit bitmap in RGBA mode, the alpha channel created by Allegro is set to all 0 by default. This will cause the texture to not show up in 32bpp modes if alpha is set. You will need to fill in the alpha channel manually if you need an alpha channel.<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>bmp</em>&nbsp;</td><td>The bitmap to be converted to a texture. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>The conversion flags. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>internal_format</em>&nbsp;</td><td>The texture format to convert to.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>GLuint The texture handle, or 0 on failure </dd></dl>

<p>
Definition at line <a class="el" href="texture_8c-source.html#l01165">1165</a> of file <a class="el" href="texture_8c-source.html">texture.c</a>.
<p>
References <a class="el" href="texture_8c-source.html#l00355">__allegro_gl_get_bitmap_color_format()</a>, <a class="el" href="texture_8c-source.html#l00311">__allegro_gl_get_bitmap_type()</a>, <a class="el" href="texture_8c-source.html#l00038">__allegro_gl_get_format_description()</a>, <a class="el" href="texture_8c-source.html#l00190">__allegro_gl_get_texture_format_ex()</a>, <a class="el" href="texture_8c-source.html#l00596">__allegro_gl_munge_bitmap()</a>, <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, <a class="el" href="alleggl_8h-source.html#l00549">AGL_TEXTURE_ALPHA_ONLY</a>, <a class="el" href="alleggl_8h-source.html#l00533">AGL_TEXTURE_FLIP</a>, <a class="el" href="alleggl_8h-source.html#l00527">AGL_TEXTURE_HAS_ALPHA</a>, <a class="el" href="alleggl_8h-source.html#l00538">AGL_TEXTURE_MASKED</a>, <a class="el" href="alleggl_8h-source.html#l00522">AGL_TEXTURE_MIPMAP</a>, <a class="el" href="alleggl_8h-source.html#l00544">AGL_TEXTURE_RESCALE</a>, <a class="el" href="glext_8c-source.html#l00055">allegro_gl_extensions_GL</a>, <a class="el" href="texture_8c-source.html#l00897">do_texture_upload()</a>, <a class="el" href="aglf_8c-source.html#l00028">PREFIX_E</a>, and <a class="el" href="alleggl_8c-source.html#l00024">PREFIX_I</a>.
<p>
Referenced by <a class="el" href="fontconv_8c-source.html#l01823">aglf_upload_texture()</a>, <a class="el" href="texture_8c-source.html#l00495">allegro_gl_check_texture_ex()</a>, <a class="el" href="texture_8c-source.html#l01402">allegro_gl_make_masked_texture()</a>, <a class="el" href="texture_8c-source.html#l01383">allegro_gl_make_texture()</a>, and <a class="el" href="gui_8c-source.html#l00538">allegro_gl_set_mouse_sprite()</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>