<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Error Log &#187; GLX</title>
	<atom:link href="http://www.errorlog.dk/tag/glx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.errorlog.dk</link>
	<description>Problems I&#039;ve found solutions for.</description>
	<lastBuildDate>Thu, 20 Nov 2008 11:43:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SDL SetVideoMode failed: Couldn&#8217;t find matching GLX visual</title>
		<link>http://www.errorlog.dk/2008/08/26/sdl-setvideomode-failed/</link>
		<comments>http://www.errorlog.dk/2008/08/26/sdl-setvideomode-failed/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 21:49:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[GLX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SDL]]></category>

		<guid isPermaLink="false">http://errorlog.dk.linux1.unoeuro.com/?p=1</guid>
		<description><![CDATA[Problem
I tried starting ufoai after installing it and got an error saying:
SDL SetVideoMode failed: Couldn't find matching GLX visual
While googling for the error I could see it also happens with Quake2, though I haven&#8217;t installed that myself so I only have the general rather than specific solution for that program.

Cause
This happens with many SDL programs [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>I tried starting ufoai after installing it and got an error saying:</p>
<pre>SDL SetVideoMode failed: Couldn't find matching GLX visual</pre>
<p>While googling for the error I could see it also happens with Quake2, though I haven&#8217;t installed that myself so I only have the general rather than specific solution for that program.</p>
<h4><span id="more-1"></span></h4>
<h2>Cause</h2>
<p>This happens with many SDL programs at startup, because the program can&#8217;t detect the video mode X windows is in, so it tries with the default settings, and if they are not compatible with the current mode, you get the &#8220;SDL SetVideoMode failed: Couldn&#8217;t find matching GLX visual&#8221; error.</p>
<h2>Solution</h2>
<p>In general the solution is to explicitely set the video mode the program is supposed to use so it matches the current mode.</p>
<p>For ufoai specifically, this was done by creating a config.cfg in  ~/.ufoai/2.2/base containing</p>
<pre>  set r_bitdepth "16"
  set r_colordepth "4"</pre>
<p>since that&#8217;s what matched the screen configuration I was using.</p>
<p>Other programs are likely to have a similar way to control which values the program should call SetVideoMode with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.errorlog.dk/2008/08/26/sdl-setvideomode-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
