title: How can I use ARGB color in opengl/SDL?
body: <p>I am rendering SVG using Cairo. The Cairo output format is ARGB. Then I put rendered image in a SDL_Surface so I can use it as a openGL texture.</p>
  
  <p>The rendered image was looking just fine when I use directly the SDL_Surface. But I had to use the surface as a texture in openGL because I needed some openGL function. The problem is, that all the color are flipped. OpenGL use RGBA and not ARGB.</p>
  
  <p>I was wondering if anybody could help me converting a SDL_Surface ARGB to RGBA.</p>
  
  <p>Usefull information:<br>
  I used this tutorial to render my SVG.
  <a href="http://tuxpaint.org/presentations/sdl_svg_svgopen2009_kendrick.pdf" rel="noreferrer">http://tuxpaint.org/presentations/sdl_svg_svgopen2009_kendrick.pdf</a><br>
  My software is written in C.</p>
  
  <p>EDIT:
  I used this tutorial to use a SDL_Surface as a openGL texture.<br>
  <a href="http://www.sdltutorials.com/sdl-tip-sdl-surface-to-opengl-texture" rel="noreferrer">http://www.sdltutorials.com/sdl-tip-sdl-surface-to-opengl-texture</a></p>
  
  <p>Both the rendering process and the opengl texture are the same as the tutorials.</p>