title: How do you display images in OpenGL
body: <p>How do you render images (.bmp and .jpeg) using OpenGL ? 
  I've come across some tutorials, but they were for C# not C/C++.
  The reason I want to render images, is because I want to draw a spaceship(for a game). I could  use a OpenGL primitive, but it doesn't really look that great. The other option is to draw the spaceship using co-ordinates, but that would take ages, and wouldnt look as good.</p>
  
  <p>running the following snippet always returns failed:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;GL/glfw.h&gt;
  using namespace std;
  int main()
  {
    GLFWimage image;
    if(glfwReadImage("ship.tga", &amp;image, GLFW_ORIGIN_UL_BIT)!=GL_TRUE);
    cout &lt;&lt; "FAILED";
    system("PAUSE");
    return 0;
  }
  </code></pre>
  
  <p>What am I doing wrong ?
  Poorly written code. Sorry about that. Works now</p>