<?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>rel=me &#187; OpenGL</title>
	<atom:link href="http://rel.me/t/opengl/feed/" rel="self" type="application/rss+xml" />
	<link>http://rel.me</link>
	<description>programming, objective-c, cocoa, iphone, c</description>
	<lastBuildDate>Wed, 01 Feb 2012 07:26:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Open sourced (Flickr OpenGL C# Library)</title>
		<link>http://rel.me/2007/03/20/open-sourced-flickr-opengl-c-library/</link>
		<comments>http://rel.me/2007/03/20/open-sourced-flickr-opengl-c-library/#comments</comments>
		<pubDate>Tue, 20 Mar 2007 02:06:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[tao]]></category>

		<guid isPermaLink="false">/2007/09/03/open-sourced-flickr-opengl-c-library</guid>
		<description><![CDATA[Crossposted from cellardoorsw.com: I GPL licensed all the source to Slickr (that I wrote), and released it into the wild. You can view the trac page, or go straight to the source. Its all C# and OpenGL goodness with some gnarly calls to some windows api&#8217;s (for extra&#8217;s nothing critical). There are a couple NAnt [...]]]></description>
			<content:encoded><![CDATA[<p>Crossposted from <a href="http://cellardoorsw.com/">cellardoorsw.com</a>:</p>
<p>I GPL licensed all the source to Slickr (that I wrote), and released it into the wild. You can view the <a href="http://trac.ducktyper.com/slickr/">trac page</a>, or go straight to the <a href="http://svn.ducktyper.com/slickr">source</a>. Its all C# and OpenGL goodness with some gnarly calls to some windows api&#8217;s (for extra&#8217;s nothing critical). There are a couple NAnt build scripts for when I was trying to get it working under linux, but you&#8217;ll want Visual Studio (2003) to get started quick (and look at the <a href="http://svn.ducktyper.com/slickr/trunk/README">README</a>).<br />
Who knew it would be such a pain to draw <a href="http://svn.ducktyper.com/slickr/trunk/Source/GlFont2.cs">text</a> and did I really need to query the <a href="http://svn.ducktyper.com/slickr/trunk/Source/Util/Windows/WindowsUtils.cs">monitor power state</a>?</p>
<p>I&#8217;ll try to write an overall design doc soon, but until then start at any of the <a href="http://svn.ducktyper.com/slickr/trunk/ScreenSaver/Entrypoint.cs">Entrypoint</a>&#8216;s. And in the end all that is really going on is this:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt>5<tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt>11<tt>
</tt>12<tt>
</tt>13<tt>
</tt>14<tt>
</tt>15<tt>
</tt>16<tt>
</tt>17<tt>
</tt>18<tt>
</tt>19<tt>
</tt><strong>20</strong><tt>
</tt>21<tt>
</tt>22<tt>
</tt>23<tt>
</tt>24<tt>
</tt>25<tt>
</tt>26<tt>
</tt>27<tt>
</tt>28<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }">private void DrawGLTexture(SlickrImage image)<tt>
</tt>{<tt>
</tt>  PointFloat p = image.GetMovement(window.Width, window.Height, true);<tt>
</tt>  float scale = image.GetScale(window.Width, window.Height);<tt>
</tt>  float fade = image.GetPercentageFade();<tt>
</tt>  int texWidth = image.TextureWidth;<tt>
</tt>  int texHeight = image.TextureHeight;<tt>
</tt><tt>
</tt>  Gl.glMatrixMode(Gl.GL_PROJECTION);                                  // Select The Projection Matrix<tt>
</tt>  Gl.glLoadIdentity();                                                // Reset The Projection Matrix<tt>
</tt>  float r = (window.Width/scale);<tt>
</tt>  float b = (window.Height/scale);<tt>
</tt><tt>
</tt>  Gl.glOrtho(0, r, b, 0, -1.0f, 1.0f);<tt>
</tt>  Gl.glMatrixMode(Gl.GL_MODELVIEW);                                   // Select The Modelview Matrix<tt>
</tt>  Gl.glLoadIdentity();<tt>
</tt><tt>
</tt>  Gl.glEnable (Gl.GL_BLEND); // for text fading<tt>
</tt>  Gl.glBlendFunc (Gl.GL_ONE, Gl.GL_ONE_MINUS_SRC_ALPHA);<tt>
</tt>  Gl.glColor4f (fade, fade, fade, fade);<tt>
</tt><tt>
</tt>  float posX = p.x; //stepX +<tt>
</tt>  float posY = p.y; //stepY +<tt>
</tt><tt>
</tt>  image.DrawAtPoint(posX, posY);<tt>
</tt><tt>
</tt>  Gl.glDisable(Gl.GL_BLEND);<tt>
</tt>}</pre>
</td>
</tr>
</table>
<p>If you are interesting in working on bug fixes, enhacements, or whatever give me a <a href="mailto:gabrielh@gmail.com">shout.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/03/20/open-sourced-flickr-opengl-c-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

