<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>AllegroGL and BITMAP</title>
		<link>http://www.allegro.cc/forums/view/589876</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 05 Feb 2007 00:08:37 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m playing a bit with AllegroGL. And I&#39;m confused with one thing...
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span> bmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_video_bitmap" target="_blank"><span class="a">create_video_bitmap</span></a><span class="k2">(</span> <span class="n">64</span>, <span class="n">64</span> <span class="k2">)</span><span class="k2">;</span>
GLuint texture <span class="k3">=</span> allegro_gl_make_texture<span class="k2">(</span> bmp <span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
What exactly get&#39;s done by allegro_gl_make_texture? Can I call destroy_bitmap( bmp ) now, because texture was sent to GPU? Do I even need to call create_video_bitmap? What would changed if I called create_bitmap?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (mscava)</author>
		<pubDate>Sat, 03 Feb 2007 23:02:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>allegro_gl_make_texture will create a texture from your bitmap, it does some checking though, try looking at the source to see it (..\alleggl-0.4.0\src\texture.c), but basically does that. I&#39;m almost sure it is safe to destry your bitmap afterwards, and yes, you can use create_bitmap.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (vbovio)</author>
		<pubDate>Sun, 04 Feb 2007 09:27:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
What would changed if I called create_bitmap?
</p></div></div><p>
I thought that using create_bitmap was the norm? Theres no real point (AFAIK) on using video bitmaps just to make an OpenGL texture.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Can I call destroy_bitmap( bmp ) now, because texture was sent to GPU?
</p></div></div><p>
Yes - it is not needed anymore.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sun, 04 Feb 2007 14:40:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>As mentioned above, using video bitmaps is pointless in your case, and the bitmaps are safe to delete after they&#39;re sent to the graphics card...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mr. Big)</author>
		<pubDate>Sun, 04 Feb 2007 16:08:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks. I&#39;ve found it out in the source that BITMAP must be memory. Well and I&#39;m trying to create some kind of Bitmap class where I&#39;d merge AllegroGL and Allegro... The only problem is that the memory for Bitmap will be allocated twice, becuase when I want to edit the texture I&#39;ll have to draw onto Allegro&#39;s one and create GL texture again... But at least I&#39;m not confused now.. Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (mscava)</author>
		<pubDate>Sun, 04 Feb 2007 16:33:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When the display driver is GFX_OPENGL, create_video_bitmap() creates a BITMAP* built upon a OpenGL texture. Drawing such a BITMAP* to the &#39;screen&#39; BITMAP* will be extremely fast (well, in theory). The only thing is that this wrapper thing is still unfinished and only blit(), masked_blit(), draw_sprite() and draw_trans_sprite() are available.<br />No point merging AllegroGL and Allegro since AllegroGL does it already, or at least it tries.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Milan Mimica)</author>
		<pubDate>Sun, 04 Feb 2007 23:20:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
When the display driver is GFX_OPENGL, create_video_bitmap() creates a BITMAP* built upon a OpenGL texture. Drawing such a BITMAP* to the &#39;screen&#39; BITMAP* will be extremely fast (well, in theory). The only thing is that this wrapper thing is still unfinished and only blit(), masked_blit(), draw_sprite() and draw_trans_sprite() are available.<br />No point merging AllegroGL and Allegro since AllegroGL does it already, or at least it tries.
</p></div></div><p>
Nice to know... I&#39;ll try to look on it a bit!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (mscava)</author>
		<pubDate>Sun, 04 Feb 2007 23:32:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>src/videovtb.c and src/glvtable.c</p><p>Get it from the SVN because there were some changes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Milan Mimica)</author>
		<pubDate>Mon, 05 Feb 2007 00:08:37 +0000</pubDate>
	</item>
</rss>
