<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0EMR34yeCp7ImA9WhRWGE0.&quot;"><id>tag:blogger.com,1999:blog-1686626258881199570</id><updated>2012-01-05T14:14:46.090-08:00</updated><category term="C++" /><category term="Python" /><category term="Learning" /><category term="The Red Book" /><category term="Ruby" /><category term="Bjarne Stroustrup" /><category term="Review" /><category term="Clojure" /><category term="Lua" /><category term="LWJGL" /><category term="JavaScript" /><category term="Java" /><category term="DirectX" /><category term="Lisp" /><category term="API" /><category term="OpenGL" /><title>PSNB's Programming</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://psnb92-programming.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://psnb92-programming.blogspot.com/" /><author><name>PSNB92</name><uri>http://www.blogger.com/profile/05938148890993112625</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/PsnbsProgrammingBlog" /><feedburner:info uri="psnbsprogrammingblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0UHR3syfip7ImA9WhRWGE0.&quot;"><id>tag:blogger.com,1999:blog-1686626258881199570.post-4581095456471945940</id><published>2012-01-05T03:01:00.000-08:00</published><updated>2012-01-05T14:07:16.596-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-05T14:07:16.596-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Review" /><category scheme="http://www.blogger.com/atom/ns#" term="The Red Book" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenGL" /><title>Book Rant: OpenGL Programming Guide - 7th edition</title><content type="html">As I mentioned in my first post "&lt;a href="http://psnb92-programming.blogspot.com/2012/01/bit-of-history.html"&gt;A Bit of History...&lt;/a&gt;", I ended up reading through the "OpenGL Red Book" when I first started studying OpenGL. However, I neglected to mention just how infuriated it made me.&lt;br /&gt;
&lt;br /&gt;
You see, the "OpenGL Red Book" is just a nickname that was given to the "OpenGL Programming Guide". It has a reputation of being &lt;i&gt;the&lt;/i&gt;&amp;nbsp;book to read if you're planning on learning OpenGL. While this may have been true in the past, it sure as hell isn't the case anymore.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
The most up-to-date edition of the book covers OpenGL 3.0 and 3.1. Admittedly, this is a little out of date as the current version of OpenGL is 4.2, but it is still new enough to remain largely relevant. Since the introduction of shaders with OpenGL 2.0, the focus of the API has gradually veered away from fixed-functionality, and into a programmable pipeline. With the introduction of OpenGL 3.0, much of the original API was marked as deprecated, namely immediate-mode rendering and fixed-functionality.&lt;br /&gt;
&lt;br /&gt;
Deprecating old features gives way for new and improved features to come in and supersede them. In the case of OpenGL, immediate-mode rendering would be replaced by buffers stored on the GPU, and fixed-functionality would be replaced by programmable shaders. Surely these topics would be the primary focus of the book, right?&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the answer is resounding no. A large portion of the book focuses on deprecated components of the API, only to tell you not to use any of it afterwards. This would have been more than acceptable if they just skimmed over what had been deprecated and moved on, but this is far from the case. There is a single chapter dedicated to shaders, and a section within a chapter dedicated to Vertex Buffer Objects.&lt;br /&gt;
&lt;br /&gt;
Save yourself the trouble of reading through this and just skip directly to "The OpenGL Shading Language: 3rd Edition", nicknamed "The Orange Book". While not perfect, it is infinitely better than this garbage, and actually covers topics relevant to modern versions of OpenGL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1686626258881199570-4581095456471945940?l=psnb92-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LvQLfqGHWaEiRtcTN8FELWGfrO0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LvQLfqGHWaEiRtcTN8FELWGfrO0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LvQLfqGHWaEiRtcTN8FELWGfrO0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LvQLfqGHWaEiRtcTN8FELWGfrO0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PsnbsProgrammingBlog/~4/7L2TmAMRXTA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psnb92-programming.blogspot.com/feeds/4581095456471945940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psnb92-programming.blogspot.com/2012/01/book-review-opengl-programming-guide.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/4581095456471945940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/4581095456471945940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsnbsProgrammingBlog/~3/7L2TmAMRXTA/book-review-opengl-programming-guide.html" title="Book Rant: OpenGL Programming Guide - 7th edition" /><author><name>PSNB92</name><uri>http://www.blogger.com/profile/05938148890993112625</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://psnb92-programming.blogspot.com/2012/01/book-review-opengl-programming-guide.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IMSHg5eip7ImA9WhRWGE0.&quot;"><id>tag:blogger.com,1999:blog-1686626258881199570.post-163543056843507887</id><published>2012-01-04T21:15:00.000-08:00</published><updated>2012-01-05T14:13:09.622-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-05T14:13:09.622-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="LWJGL" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenGL" /><title>Tutorial: Creating an LWJGL window with a Canvas</title><content type="html">One of the more difficult things to do with LWJGL is getting a rendering context setup. Most tutorials make you create a DisplayMode and create a native window, which limits you to resolutions that are supported by your monitor, which can be somewhat annoying if you plan on running your game in windowed mode. Luckily, there is an easy work around that will allow you to set your window to whatever size you want.&lt;br /&gt;
&lt;div&gt;&lt;a name='more'&gt;&lt;/a&gt;The first thing that we need to do is create a new window and add a canvas to it. Typically, I would create a new class that extends JFrame as it makes the code much more manageable, and allows me to separate the window from the engine. However, for the purposes of this tutorial, I'll just use an instance of a JFrame since it requires much less setup.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;code&gt;JFrame frame = new JFrame();&lt;br /&gt;
//Set JFrame properties here...&lt;br /&gt;
&lt;br /&gt;
Canvas canvas = new Canvas();&lt;br /&gt;
//Required to set the size of the window.&lt;br /&gt;
canvas.setPreferredSize(new Dimension(desiredWidth, desiredHeight));&lt;br /&gt;
&lt;br /&gt;
//Add the canvas to the frame.&lt;br /&gt;
frame.add(canvas);&lt;br /&gt;
&lt;br /&gt;
//Prepare and display the frame.&lt;br /&gt;
frame.pack();&lt;br /&gt;
frame.setLocationRelativeTo(null);&lt;br /&gt;
frame.setVisible(true);&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
If we run the program now, we'll get a basic Swing window with a canvas added to it.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://oi40.tinypic.com/ra6ijm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="224" src="http://oi40.tinypic.com/ra6ijm.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now we need to bind the window to an OpenGL context. This is incredibly easy to do, and only takes a few lines of code to accomplish.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;try {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Display.setParent(canvas);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Display.create();&lt;br /&gt;
} catch(LWJGLException e) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Handle the exception as you see fit.&lt;br /&gt;
}&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now our window is bound to an OpenGL context, and can be drawn on just like normal. If your program hangs, make sure that you're calling &lt;code&gt;Display.update()&lt;/code&gt; constantly, and that you're not running the engine on a Swing thread.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1686626258881199570-163543056843507887?l=psnb92-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0umLmjc7IAONpYby7L8ivx3aybE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0umLmjc7IAONpYby7L8ivx3aybE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0umLmjc7IAONpYby7L8ivx3aybE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0umLmjc7IAONpYby7L8ivx3aybE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PsnbsProgrammingBlog/~4/MJrB7bNgPgo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psnb92-programming.blogspot.com/feeds/163543056843507887/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psnb92-programming.blogspot.com/2012/01/tutorial-creating-lwjgl-window-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/163543056843507887?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/163543056843507887?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsnbsProgrammingBlog/~3/MJrB7bNgPgo/tutorial-creating-lwjgl-window-with.html" title="Tutorial: Creating an LWJGL window with a Canvas" /><author><name>PSNB92</name><uri>http://www.blogger.com/profile/05938148890993112625</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://psnb92-programming.blogspot.com/2012/01/tutorial-creating-lwjgl-window-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AHQng5eyp7ImA9WhRWF0k.&quot;"><id>tag:blogger.com,1999:blog-1686626258881199570.post-7593480314293245750</id><published>2012-01-03T22:58:00.000-08:00</published><updated>2012-01-04T21:35:33.623-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-04T21:35:33.623-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Learning" /><category scheme="http://www.blogger.com/atom/ns#" term="Bjarne Stroustrup" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>Beginning C++</title><content type="html">A couple of days ago I decided to try picking up C++. This is not my first attempt at learning the language, but it is the most official. Previous attempts at learning the language failed because I simply jumped into things without setting things up first.&lt;br /&gt;
&lt;br /&gt;
This time around, I'm using Visual Studio instead of Code::Blocks, as it seems to be a much more well developed and featured IDE. I've also managed to get my hands on a copy of "The C++ Programming Language: Special Edition" by Bjarne Stroustrup, the language's designer.&lt;br /&gt;
&lt;br /&gt;
I'm currently only on the second chapter, which is basically an overview of the language and it's features. I have yet to really delve into much code, but I'm looking forward to it. Here's to hoping things go smoothly, cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1686626258881199570-7593480314293245750?l=psnb92-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vKpHMeoJUpiGdUTCKotfbW6Q8dY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vKpHMeoJUpiGdUTCKotfbW6Q8dY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vKpHMeoJUpiGdUTCKotfbW6Q8dY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vKpHMeoJUpiGdUTCKotfbW6Q8dY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PsnbsProgrammingBlog/~4/_sESPt0bkTo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psnb92-programming.blogspot.com/feeds/7593480314293245750/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psnb92-programming.blogspot.com/2012/01/beginning-c.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/7593480314293245750?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/7593480314293245750?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsnbsProgrammingBlog/~3/_sESPt0bkTo/beginning-c.html" title="Beginning C++" /><author><name>PSNB92</name><uri>http://www.blogger.com/profile/05938148890993112625</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://psnb92-programming.blogspot.com/2012/01/beginning-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EMR386eSp7ImA9WhRWGE0.&quot;"><id>tag:blogger.com,1999:blog-1686626258881199570.post-6708739172946638830</id><published>2012-01-03T21:45:00.000-08:00</published><updated>2012-01-05T14:14:46.111-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-05T14:14:46.111-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="Ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="Lisp" /><category scheme="http://www.blogger.com/atom/ns#" term="Lua" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenGL" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="DirectX" /><category scheme="http://www.blogger.com/atom/ns#" term="Clojure" /><title>A Bit of History...</title><content type="html">Ever since I was a little kid I've been interested in computers. My first experience with any sort of programming was when I was 10 and received a book on JavaScript from my parents. I remember looking through the first few chapters and how accomplished I felt when I wrote my first clock script. However, my excitement was short lived as I quickly became frustrated and gave up once the concepts started to get complex.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
A few years later, I decided - for whatever reason - that I wanted to give programming another try. At this point, I had really no understanding of programming languages, all I knew was that I wanted to work on applications. After a bit of studying, I narrowed my choices down to Java and C++, eventually going with Java because it had a very well written, and very well documented tutorial series available for free on it's website. I picked up the language quite easily and stuck with it exclusively for a few years.&lt;br /&gt;
&lt;br /&gt;
Around a year ago, I started to become bored and wanted to learn something new. By this time I had wanted to try getting into game development and decided to compile a list of tools and concepts that are used in game engines.&lt;br /&gt;
&lt;br /&gt;
Initially, I looked at scripting languages that could be used alongside Java. The first language I looked at was Clojure, a dialect of Lisp that was developed to run specifically on the JVM. However, the language syntax was different from anything I had seen before, and I was immediately turned off from the language.&amp;nbsp;Afterwards, I decided to take a look at some Ruby and Lua libraries that were available for Java. Unlike Clojure, the libraries weren't made for the JVM, and were instead just ported and linked to native libraries in C++. I ended up learning both of these languages, though I'm still not incredibly familiar with them.&lt;br /&gt;
&lt;br /&gt;
Next on my list was 3D graphics. I knew that OpenGL &amp;amp; DirectX were the two main 3D APIs, and decided to pick up OpenGL because DirectX is windows only, while OpenGL is cross platform. I ended up reading through the Red Book for learning OpenGL, and am now reading through the Orange Book for learning GLSL. Though I'm still pretty new to both, I can still create some pretty interesting things.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://oi43.tinypic.com/zim980.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://oi43.tinypic.com/zim980.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1686626258881199570-6708739172946638830?l=psnb92-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jv5RigdYzk0qPaKn7eMgWXRmdrw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jv5RigdYzk0qPaKn7eMgWXRmdrw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jv5RigdYzk0qPaKn7eMgWXRmdrw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jv5RigdYzk0qPaKn7eMgWXRmdrw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PsnbsProgrammingBlog/~4/4Jn9SmcdVUU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psnb92-programming.blogspot.com/feeds/6708739172946638830/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psnb92-programming.blogspot.com/2012/01/bit-of-history.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/6708739172946638830?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1686626258881199570/posts/default/6708739172946638830?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsnbsProgrammingBlog/~3/4Jn9SmcdVUU/bit-of-history.html" title="A Bit of History..." /><author><name>PSNB92</name><uri>http://www.blogger.com/profile/05938148890993112625</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://psnb92-programming.blogspot.com/2012/01/bit-of-history.html</feedburner:origLink></entry></feed>

