<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Drawing in Allegro5</title>
		<link>http://www.allegro.cc/forums/view/618100</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 27 Apr 2020 12:12:52 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
I&#39;ve been watching Javidx9&#39;s videos for a bit, and I really like some of the stuff he shows off. </p><p>1. I&#39;ve been tempted to port his 3D engine across to use within Allegro (when I&#39;ve finally watched them), though I see there&#39;s some 3D transformation functions in Allegro. Is their purpose for 3D perspective transformations, or am I misunderstanding their purpose? and are there any examples of how to use these? </p><p>2. In regards to 2D bitmaps, my understanding is they&#39;re drawn as two textured triangles, so would it be possible to render a bitmap with a custom set of points so you could get non-square renderings?<br />Example shown here:<br /><a href="https://youtu.be/8OfgGUGP4Vc?t=835">https://youtu.be/8OfgGUGP4Vc?t=835</a></p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pmprog)</author>
		<pubDate>Sun, 26 Apr 2020 11:07:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ha, I&#39;ve just started watching his channel too. Small world.</p><p>Allegro is more than capable of proper 3D these days, though. It depends what level of functionality you need really; <a href="https://liballeg.org/a5docs/trunk/transformations.html#al_perspective_transform"><tt>al_perspective_transform</tt></a> does just that, and along with some of the slightly higher-level stuff like <a href="https://liballeg.org/a5docs/trunk/transformations.html#al_build_camera_transform"><tt>al_build_camera_transform</tt></a> it&#39;s not bad at all.</p><p>As for drawing sprites on arbitrary polygons, a good starting point for that is <a href="https://liballeg.org/a5docs/trunk/primitives.html#al_draw_prim"><tt>al_draw_prim</tt></a> - you can just pass in an <span class="source-code"><a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a></span> as the texture.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dthompson)</author>
		<pubDate>Sun, 26 Apr 2020 17:46:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the reply.</p><p>Must have overlooked al_draw_prim, but that&#39;s great to know, thank you.</p><p>Regarding 3D, I&#39;m looking at a simple voxel engine (but, no, not Minecraft-esque). </p><p>At the minute, I&#39;ve just created a bitmap with orthographic view of a cube, with the idea of tint-drawing them to give them colour. But I did like the idea of changing to one of the four orthographic views, and also texturing the different faces - hence the questions on drawing none-square bitmaps.</p><p>That said though Javidx9&#39;s latest video could pretty much work for me, if I shrink down his tilesize and &quot;layer up&quot;. </p><p>It still might be worth trying to understand the 3D transform functions anyway, so thank you for the pointers. I&#39;ll see if I can figure out how to draw the usual 3D hello world (spinning cube).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pmprog)</author>
		<pubDate>Mon, 27 Apr 2020 12:12:52 +0000</pubDate>
	</item>
</rss>
