title: SDL2 cross-platform OpenGL 3+ and OpenGL ES 2.0 or 3.0
body: <p>Is there some super-easy basic hello world cube project (with setup tutorial) for SDL2 that builds and runs easily across (Windows, Linux eg Ubuntu, Mac OS X, Android, iOS), using modern OpenGL as in OpenGL 3.x or 4.x and OpenGLES 2.0 or 3.0?</p>
  
  <p>I downloaded SDL2 and it was pretty easy to get their example testgles.cpp and testgl.cpp to build...</p>
  
  <p>However, the testgl.cpp one is horribly old (gl2 style), so I tried the testgles.cpp.  Unfortunately, even this is full of old style fixed function calls like glMatrixMode(GL_MODELVIEW).  And it's annoyingly over-integrated with SDLTest_Common code.</p>
  
  <p>Is there a better simple clean hello world project (eg colored cube, textured cube) that I can start from?</p>
  
  <p>Or is there some reason why they don't include such an example starting project or tutorial?</p>
  
  <p>Or should I be using a different library instead of SDL2 that is simpler &amp; cleaner to setup?  Basically I want to write OpenGL / OpenGLES (and maybe DirectX) cross-platform C++ code.  But setting up SDL2 has been a lot messier and more painful than I expected.</p>
  
  <p>So far I just made an svn repository with SDL2 code and got testgl.cpp and testgles.cpp to build on those five platforms.  But that used a lot of old style OpenGL/OpenGLES code, so now I am slowly hacking it to use newer stuff...  It's been quite a pain.  I don't get why SDL2 doesn't just include a basic hello world cross-platform starting project (eg textured cube) using modern OpenGL/OpenGLES (and DirectX).</p>