<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>vsync with OpenGL</title>
		<link>http://www.allegro.cc/forums/view/613500</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 17 Nov 2013 18:34:29 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I want to have vsync and OpenGL enabled in my allegro game.</p><p>With vsync set to require, if I set the display flag to ALLEGRO_OPENGL_3_0 or ALLEGRO_DIRECT3D it works fine, but if I set it to ALLEGRO_OPENGL vsync is always disabled. Why is this?</p><p>Without vsync enabled, my game stutters periodically, even though it runs well within 60 fps.</p><p>I&#39;m using Allegro 5.0.10 on Windows 7
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ph03nix)</author>
		<pubDate>Sat, 16 Nov 2013 10:46:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Check your video card driver settings. Chances are they&#39;re overriding Allegro&#39;s attempts to vsync. If that&#39;s not it, it could be you simply need to update your drivers. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kris Asick)</author>
		<pubDate>Sat, 16 Nov 2013 11:09:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My video card settings are all default, and the drivers are up to date. It only effects opengl, not even opengl 3.0 (I&#39;m not entirely sure what the difference is) <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ph03nix)</author>
		<pubDate>Sat, 16 Nov 2013 11:33:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s a bug in Allegro. Needs effort to be put into it, but nobody has as of yet. The workabout is to manually call <span class="source-code"><a href="http://www.allegro.cc/manual/al_wait_for_vsync"><span class="a">al_wait_for_vsync</span></a></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sat, 16 Nov 2013 12:33:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>al_wait_for_vsync returns false and does nothing. Is this the only way I can achieve vsync with ALLEGRO_OPENGL?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ph03nix)</author>
		<pubDate>Sat, 16 Nov 2013 18:56:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I haven&#39;t actually tried this yet but are there any drawbacks to going with OpenGL 3.0 in Allegro 5? I mean, not a lot of people anymore are going to be running video cards that can&#39;t support it and you could always just run a check ahead of time to see if it&#39;s supported by the end user&#39;s video card and go with the regular OpenGL interface if it&#39;s not.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kris Asick)</author>
		<pubDate>Sat, 16 Nov 2013 21:38:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t think there are any as long as you don&#39;t choose forward compatible option. If you do, some things will break (e.g. the primitives addon).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sun, 17 Nov 2013 00:17:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was curious about the GL versions, so I printed them under ALLEGRO_OPENGL and ALLEGRO_OPENGL_3_0. In ALLEGRO_OPENGL it&#39;s 3.1.0, in ALLEGRO_OPENGL_3_0 <b>it has no version</b>, it doesn&#39;t seem to be using openGL at all!</p><p>So is it impossible to have vsync with openGL? That seems like a terrible flaw to me, it makes openGL unusable...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ph03nix)</author>
		<pubDate>Sun, 17 Nov 2013 01:30:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, don&#39;t you have to specify ALLEGRO_OPENGL AND ALLEGRO_OPENGL_3_0 ? For some reason I&#39;m thinking the 3_0 one is a modifier for ALLEGRO_OPENGL.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 17 Nov 2013 05:18:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/613500/992593#target">ph03nix</a> said:</div><div class="quote"><p>That seems like a terrible flaw to me, it makes openGL unusable... </p></div></div><p>

Indeed. Luckily this is only with WGL.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Sun, 17 Nov 2013 05:20:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Mind you, vSync in OpenGL mode should work fine without calling al_wait_for_vsync() if the graphics drivers themselves are set to force vSyncing on.</p><p>Though I am confused somewhat as every system I&#39;ve tested my current project on vSynced perfectly fine in OpenGL mode, mind you the last major testing I did with it was with Allegro 5.0.8. Now I&#39;m curious if the bug Siege is referring to is something that recently ended up getting introduced or if it&#39;s related to specific hardware.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kris Asick)</author>
		<pubDate>Sun, 17 Nov 2013 05:29:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It has never worked for me without <span class="source-code"><a href="http://www.allegro.cc/manual/al_wait_for_vsync"><span class="a">al_wait_for_vsync</span></a></span>, Linux or Windows. It&#39;s probably a hardware issue, but that&#39;s not an excuse.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sun, 17 Nov 2013 05:32:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>al_wait_for_vsync should not be used though (except for special purposes) because in most cases you will wait twice then and half frame rate.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Sun, 17 Nov 2013 18:34:29 +0000</pubDate>
	</item>
</rss>
