<?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"
	>

<channel>
	<title>Mrmoen.com / Matt Moen</title>
	<atom:link href="http://www.mrmoen.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mrmoen.com</link>
	<description>Technical Projects, Interests, and Tutorials</description>
	<pubDate>Wed, 09 Apr 2008 19:29:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Cross-Platform Graphics with SDL and OpenGL</title>
		<link>http://www.mrmoen.com/2008/04/08/cross-platform-graphics-with-sdl-and-opengl/</link>
		<comments>http://www.mrmoen.com/2008/04/08/cross-platform-graphics-with-sdl-and-opengl/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 06:16:42 +0000</pubDate>
		<dc:creator>Matt Moen</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[cross-platform]]></category>

		<category><![CDATA[free]]></category>

		<category><![CDATA[graphics]]></category>

		<category><![CDATA[input]]></category>

		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[open-source]]></category>

		<category><![CDATA[opengl]]></category>

		<category><![CDATA[sdl]]></category>

		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://www.mrmoen.com/2008/04/08/cross-platform-graphics-with-sdl-and-opengl/</guid>
		<description><![CDATA[With alternative operating systems like Ubuntu and OS X more popular than ever, programming for Windows alone is no longer an option.  Simple DirectMedia Layer (SDL) is a popular, cross-platform library that provides an interface for graphics, sound, and input. SDL and OpenGL can be used together to provide basic functionality to create graphics [...]]]></description>
			<content:encoded><![CDATA[<p>With alternative operating systems like <a href="http://www.ubuntu.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ubuntu.com');">Ubuntu</a> and <a href="http://www.apple.com/macosx/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.apple.com');">OS X</a> more popular than ever, programming for Windows alone is no longer an option.  <a href="http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Simple DirectMedia Layer</a> (SDL) is a popular, cross-platform library that provides an interface for graphics, sound, and input. SDL and <a href="http://en.wikipedia.org/wiki/OpenGL" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">OpenGL</a> can be used together to provide basic functionality to create graphics intensive games and simulations that build in Windows, Linux, and OS X. Many <a href="http://en.wikipedia.org/wiki/List_of_games_using_SDL" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">notable games</a> have used this approach including Second Life, Doom 3, SimCity 3000, and Unreal Tournament 2004.</p>
<p>The following is a step-by-step procedure for setting up SDL and OpenGL in a Windows environment using <a href="http://www.microsoft.com/express/vc/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">Visual C++ 2008 Express Edition</a>, a  free <a href="http://en.wikipedia.org/wiki/Integrated_development_environment" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">IDE</a> and compiler from Microsoft.</p>
<p><strong>Download the SDL development libraries:</strong></p>
<ul>
<li>Download the appropriate SDL development library from their <a href="http://www.libsdl.org/download.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.libsdl.org');">download page</a>. For this tutorial I use <a href="http://www.libsdl.org/release/SDL-devel-1.2.13-VC8.zip" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.libsdl.org');">SDL-devel-1.2.13-VC8.zip</a> (for Visual C++ 2005 SP1)</li>
<li>Extract (unzip) the file to a convenient location. This tutorial assumes the location to be &#8220;C:\SDL&#8221;.</li>
<li>At minimum, SDL.dll is needed to run SDL programs on Windows. The easiest way to use this is to copy SDL.dll from C:\SDL\lib to C:\Windows\System32. Alternatively, you may place a copy in the project directory or in the same directory as the compiled executable.</li>
</ul>
<p><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/newproj.png"  title="New Project"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/newproj.thumbnail.png" alt="New Project" align="right" /></a><strong>Run Visual C++ and create a new project:</strong></p>
<ul>
<li>Under the File menu select New → Project (Ctrl+Shift+N).</li>
<li>Select Win32 Project, enter a Name, and click OK.</li>
<li>In the Wizard click Next, then check the box next to Empty Project, and click Finish.</li>
</ul>
<p><strong>Add a new source file for the project:</strong></p>
<ul>
<li>Under the Project menu select Add New Item (Ctrl+Shift+A).</li>
<li> Select C++ File (.cpp), enter a Name, and click OK.</li>
</ul>
<p><strong>Configure the compiler:</strong><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/runtimelib.png"  title="Compiler Settings"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/runtimelib.thumbnail.png" alt="Compiler Settings" align="right" /></a></p>
<ul>
<li>Under the Project menu select Project Properties (Alt+F7) at the bottom.</li>
<li>Select Configuration Properties from the navigation panel on the left.</li>
<li>Select All Configurations from the Configuration drop-down box at the top of the dialog. This ensures you are changing the settings for both the Debug and Release configurations.</li>
<li>Under C/C++ → General, set Additional Include Directories to &#8220;C:\SDL\include&#8221;.</li>
<li>Under C/C++ → Code Generation, set Runtime Library to &#8220;Multi-threaded DLL (/MD)&#8221;.</li>
</ul>
<p><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/dependencies.png"  title="Dependencies"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/dependencies.thumbnail.png" alt="Dependencies" align="right" /></a><strong>Configure the linker:</strong></p>
<ul>
<li>Under Linker → General, set Additional Library Directories to &#8220;C:\SDL\lib&#8221;.</li>
<li>Under Linker → Input, set Additional Dependencies to &#8220;sdl.lib sdlmain.lib opengl32.lib glu32.lib&#8221;.</li>
<li>Click OK to save the project properties.</li>
</ul>
<p><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/sdlsquare.png"  title="Red Square using SDL/OpenGL"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/sdlsquare.thumbnail.png" alt="Red Square using SDL/OpenGL" align="right" /></a>Visual C++ is now basically set up to use SDL and OpenGL. Coding for these libraries is beyond the scope of this tutorial, but you can use <a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/sdlopengl.cpp"  title="sdlopengl.cpp">sdlopengl.cpp</a> to get started with a simple demonstration program. When built successfully this code will draw a red square on a black background.</p>
<p>SDL and OpenGL documentation can be found on the <a href="http://www.libsdl.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.libsdl.org');">SDL website</a> including <a href="http://www.libsdl.org/tutorials.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.libsdl.org');">tutorials</a>, <a href="http://www.libsdl.org/cgi/docwiki.cgi/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.libsdl.org');">doc wiki</a>, and <a href="http://www.libsdl.org/opengl/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.libsdl.org');">OpenGL resources</a>. For other OpenGL tutorials and resources try <a href="http://nehe.gamedev.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/nehe.gamedev.net');">NeHe Productions</a>, <a href="http://www.opengl.org/documentation/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opengl.org');">OpenGL API Documentation</a>, and <a href="http://www.gamedev.net/reference/list.asp?categoryid=31" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gamedev.net');">GameDev.net</a>.</p>
<p><script type="text/javascript"> digg_url = "http://digg.com/programming/Cross_Platform_Graphics_with_SDL_and_OpenGL"; </script><br />
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoen.com/2008/04/08/cross-platform-graphics-with-sdl-and-opengl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenGL with Visual C++ 2008 Express Edition</title>
		<link>http://www.mrmoen.com/2008/03/30/opengl-with-visual-c-express-edition/</link>
		<comments>http://www.mrmoen.com/2008/03/30/opengl-with-visual-c-express-edition/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 02:06:07 +0000</pubDate>
		<dc:creator>Matt Moen</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[c++]]></category>

		<category><![CDATA[opengl]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[visual]]></category>

		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.mrmoen.com/2008/03/30/opengl-with-visual-c-express-edition/</guid>
		<description><![CDATA[OpenGL is a popular cross-platform library for 2-D and 3-D graphics programming. OpenGL comes with implementations on most operating systems and many compilers, including Visual C++ 2008 Express Edition, a modern, free IDE and compiler from Microsoft. Once VC++ 2008 is installed you simply need to create a new project and link to the correct [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/OpenGL" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">OpenGL</a> is a popular cross-platform library for 2-D and 3-D graphics programming. OpenGL comes with implementations on most operating systems and many compilers, including <a href="http://www.microsoft.com/express/vc/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">Visual C++ 2008 Express Edition</a>, a modern, free <a href="http://en.wikipedia.org/wiki/Integrated_development_environment" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">IDE</a> and compiler from Microsoft. Once VC++ 2008 is installed you simply need to create a new project and link to the correct libraries and headers to start using OpenGL.</p>
<p><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/newproj.png"  title="New Project"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/newproj.thumbnail.png" alt="New Project" align="right" /></a><strong>Run Visual C++ and create a new project:</strong></p>
<ul>
<li>Under the File menu select New → Project (Ctrl+Shift+N).</li>
<li>Select Win32 Project, enter a Name, and click OK.</li>
<li>In the Wizard click Next, then check the box next to Empty Project, and click Finish.</li>
</ul>
<p><strong>Add a new source file for the project:</strong></p>
<ul>
<li>Under the Project menu select Add New Item (Ctrl+Shift+A).</li>
<li> Select C++ File (.cpp), enter a Name, and click OK.</li>
</ul>
<p><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/linkerinput.png"  title="Project Properties - Linker Input"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/linkerinput.thumbnail.png" alt="Linker Input" align="right" /></a><strong>Link to the OpenGL libraries:</strong></p>
<ul>
<li>Under the Project menu select Project Properties (Alt+F7) at the bottom.</li>
<li>Select Configuration Properties → Linker → Input from the navigation panel on the left.</li>
<li>Select All Configurations from the Configuration drop-down box at the top of the dialog. This ensures you are changing the settings for both the Debug and Release configurations.</li>
<li>Type &#8220;opengl32.lib glu32.lib&#8221; in Additional Dependencies and click OK.</li>
</ul>
<p><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/redbox.png"  title="Red Square using OpenGL"><img src="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/04/redbox.thumbnail.png" alt="Red Square using OpenGL" align="right" /></a>Now that your project is set up to use OpenGL you can start coding. Download <strong><a href="http://www.mrmoen.com/wordpress/wp-content/uploads/2008/03/opengl.cpp"  title="OpenGL.cpp">opengl.cpp</a></strong> to begin with a basic <a href="http://en.wikipedia.org/wiki/Windows_API" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Win32</a>/OpenGL demonstration that compiles on VC++ 2008.</p>
<p>If everything is correct you should see a red square when running the code. Credit for this code goes mostly to examples from <a href="http://msdn2.microsoft.com/en-us/library/ms537714(VS.85).aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn2.microsoft.com');">MSDN</a> and <a href="http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=02" onclick="javascript:pageTracker._trackPageview('/outbound/article/nehe.gamedev.net');">NeHe</a>.</p>
<p>To learn more about OpenGL programming there are several great online resources including <a href="http://nehe.gamedev.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/nehe.gamedev.net');">NeHe Productions</a>, <a href="http://www.opengl.org/documentation/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opengl.org');">OpenGL API Documentation</a>, and <a href="http://www.gamedev.net/reference/list.asp?categoryid=31" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gamedev.net');">GameDev.net</a>.</p>
<p><script type="text/javascript"> digg_url = "http://digg.com/programming/OpenGL_with_Visual_C_2008_Express_Edition"; </script><br />
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoen.com/2008/03/30/opengl-with-visual-c-express-edition/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Discretization Error</title>
		<link>http://www.mrmoen.com/2008/03/26/discretization-error/</link>
		<comments>http://www.mrmoen.com/2008/03/26/discretization-error/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 03:28:14 +0000</pubDate>
		<dc:creator>Matt Moen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.mrmoen.com/?p=8</guid>
		<description><![CDATA[From Wikipedia, the free encyclopedia:
&#8220;In numerical analysis, computational physics, and simulation, discretization error is error resulting from the fact that a function of a continuous variable is represented in the computer by a finite number of evaluations, for example, on a lattice. Discretization error can usually be reduced by using a more finely spaced lattice, [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://en.wikipedia.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');" title="Wikipedia">Wikipedia</a>, the free encyclopedia:</p>
<blockquote><p>&#8220;In <a href="http://en.wikipedia.org/wiki/Numerical_analysis" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">numerical analysis</a>, <a href="http://en.wikipedia.org/wiki/Computational_physics" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">computational physics</a>, and <a href="http://en.wikipedia.org/wiki/Simulation" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">simulation</a>, discretization error is error resulting from the fact that a function of a continuous variable is represented in the computer by a finite number of evaluations, for example, on a lattice. Discretization error can usually be reduced by using a more finely spaced lattice, with an increased computational cost.&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoen.com/2008/03/26/discretization-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to Mrmoen.com</title>
		<link>http://www.mrmoen.com/2008/03/26/welcome-to-mrmoencom/</link>
		<comments>http://www.mrmoen.com/2008/03/26/welcome-to-mrmoencom/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 00:18:53 +0000</pubDate>
		<dc:creator>Matt Moen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mrmoen.com/wordpress/?p=3</guid>
		<description><![CDATA[The purpose of this website is to document and share my technical projects and interests. Additionally, this site will serve as a central contact point for my online presence. Please excuse any instability while I continue to set up and modify this site.
Thanks,
Matt Moen
]]></description>
			<content:encoded><![CDATA[<p>The purpose of this website is to document and share my technical projects and interests. Additionally, this site will serve as a central contact point for my online presence. Please excuse any instability while I continue to set up and modify this site.</p>
<p>Thanks,</p>
<p>Matt Moen</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoen.com/2008/03/26/welcome-to-mrmoencom/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

