<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>allegro_gl_use_mipmapping()</title>
		<link>http://www.allegro.cc/forums/view/470011</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 15 Mar 2005 04:48:54 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When I call allegro_gl_use_mipmapping(1), textures with sharp, straight lines tend to be rendered with a kind of antialiasing effect that makes them look blurry. I thought this might be down to the MAG and MIN filters, but whether they&#39;re set to GL_LINEAR or GL_NEAREST doesn&#39;t seem to make any difference. Is there some way round this (using the GLUT commands, perhaps?), or am I doomed to write my own mipmapping routines?</p><p>Thanks in advance!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Colin Duncan)</author>
		<pubDate>Mon, 14 Mar 2005 07:18:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Mipmaping will make the textures look blurry at a distance in polygons near perpendicular to the observer (like the floor). That&#39;s how mipmaping works, and there&#39;s no way around that.</p><p>A posible solution is using anisotropic filtering. But it consumes more resuorces and it&#39;s not supported be older hardware. I have no idea how to  use AF in OpenGL, though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Mon, 14 Mar 2005 07:24:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks, Oscar. I could try using mipmaps only for walls, then, but it&#39;s the floor that would benefit most from it. Is there some way to change the distance at which each mipmap level is displayed? At the moment, even textures very close to the camera look blurry. It&#39;s only these that are the problem, in fact: textures in the distance look much nicer with mipmapping on rather than off.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Colin Duncan)</author>
		<pubDate>Mon, 14 Mar 2005 07:42:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Check the texture quality settings in your control pannel. Some other video card manufacturers have a tendency to lower the rendering quality when they detect certain usage patterns.</p><p>Mipmapping should not make any difference when LINEAR or NEAREST minimification filtering is used.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Is there some way round this (using the GLUT commands, perhaps?), or am I doomed to write my own mipmapping routines?</p></div></div><p>
AllegroGL will use the GLUT routines when it can, and use its own when it can&#39;t.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob)</author>
		<pubDate>Mon, 14 Mar 2005 07:48:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was gonna say the same thing: See attached.<br />I guess there is indeed no way around it <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />  I&#39;ll check the control panel though for quality settings.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Steve Terry)</author>
		<pubDate>Mon, 14 Mar 2005 23:14:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try forcing anisotropic filtering in your videocard driver panel. For nVidia, it should be in &quot;Quality and performance configuration&quot;, and you can force it for all programs or a specific one.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Tue, 15 Mar 2005 00:36:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Try forcing anisotropic filtering in your videocard driver panel. </p></div></div><p>
You should not do that. A lot of games are incompatible with anisotropic filtering (or show curroption), so you should not usually force this setting.</p><p>One thing you should check is weather or not your textures are power-of-2 sized. The texture conversion routines in AGL were ill-defined for those cases. You really should use allegro_gl_make_texture_ex() instead of allegro_gl_make_texture().</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>I guess there is indeed no way around it </p></div></div><p>
As an experiment (please don&#39;t leave this code in your final product), try setting the LOD bias to -1:
</p><div class="source-code snippet"><div class="inner"><pre>glBindTexture<span class="k2">(</span>...<span class="k2">)</span><span class="k2">;</span>
glTexParameteri<span class="k2">(</span>..., GL_TEXTURE_LOD_BIAS, <span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

If it helps make the mipmapped case look like the non-mipmapped case, then you are looking at a driver bug.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob)</author>
		<pubDate>Tue, 15 Mar 2005 02:06:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>tex = allegro_gl_make_texture_ex (AGL_TEXTURE_MIPMAP, texture, -1);<br />Is what I used... is that wrong?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Steve Terry)</author>
		<pubDate>Tue, 15 Mar 2005 03:14:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Did you also cal
</p><div class="source-code snippet"><div class="inner"><pre>glTexParameteri<span class="k2">(</span>GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
It seems that AllegroGL sets it to GL_NEAREST_MIPMAP_NEAREST, which looks worse.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Tue, 15 Mar 2005 03:55:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Makes no difference with or without glTexPareteri <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Steve Terry)</author>
		<pubDate>Tue, 15 Mar 2005 04:13:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>It seems that AllegroGL sets it to GL_NEAREST_MIPMAP_NEAREST, which looks worse.</p></div></div><p>
Does not.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Is what I used... is that wrong?</p></div></div><p>
That&#39;s fine</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Makes no difference with or without glTexPareteri <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p></div></div><p>
Try biasing the LOD, like I mentioned above.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob)</author>
		<pubDate>Tue, 15 Mar 2005 04:48:54 +0000</pubDate>
	</item>
</rss>
