title: Loading a TGA File and Using it with OpenGL
body: <p>I currently am trying to load a tag file with c++ and rendering it with OpenGL. Currently the colors are all mixed up (red becomes blue, green becomes red, and blue becomes green). My current code for putting it into the video memory is. </p>
  
  <pre><code>glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
  </code></pre>
  
  <p>Where the data is the pixel data and the rest is self explanatory. The files are saved with no compression are in 24 bits saved from photoshop.</p>