How to set up sdl 2.0 with opengl and Ubntu?

Hi all,
just a couple of question on sdl 2.0 and opengl on ubuntu

  1. Can anyone point me to a tutorial or example of how to set up SDL2,0 for opengl, just something simple like how to set up screen, jow to flip screen.
  2. How do i get my code to use sdl 2.0 rather than 1,2? Right now in my make file I use sdl-config --cflags --libs -lSDL_mixer -lSDL_image -lSDL_ttf, are the change to show 2.0 or do I need to set library paths using -L?
  3. When will 2.0 be on the Ubuntu repos? Should I just make my own or does anyone have a date when they will be up?

I’m sure all the above are everywhere but I’ve been unable to google the right answers ( at least for the latest builds ) anywhere.
Thankyou for he help!

Can’t reply #1 for now (given I never used OpenGL directly together
with SDL2), but:

  1. The libraries are different as far as I know. Currently I just use
    -lSDL2 (I don’t use the satellite libraries), if I recall correctly
    the other libraries also got SDL changed to SDL2 in their filenames.
    (and no, I don’t use sdl-config)

  2. Whenever Canonical feels like it (probably after 2.0 gets the
    official release in May). For now I’d suggest to just build it (if you
    don’t want to mess with Mercurial you can always just use the
    snapshots, though they may be a bit outdated with regards to bugfixes

  • but not by much).

2013/4/27, tony67 :> Hi all,

just a couple of question on sdl 2.0 and opengl on ubuntu

  1. Can anyone point me to a tutorial or example of how to set up SDL2,0 for
    opengl, just something simple like how to set up screen, jow to flip
    screen.
  2. How do i get my code to use sdl 2.0 rather than 1,2? Right now in my make
    file I use sdl-config --cflags --libs -lSDL_mixer -lSDL_image -lSDL_ttf,
    are the change to show 2.0 or do I need to set library paths using -L?
  3. When will 2.0 be on the Ubuntu repos? Should I just make my own or does
    anyone have a date when they will be up?

I’m sure all the above are everywhere but I’ve been unable to google the
right answers ( at least for the latest builds ) anywhere.
Thankyou for he help!

tony67 wrote:

  1. Can anyone point me to a tutorial or example of how to set up SDL2,0 for opengl, just something simple like how to set up screen, jow to flip screen.

http://wiki.libsdl.org/moin.fcg/SDL_GL_CreateContext

Hi all,
just a couple of question on sdl 2.0 and opengl on ubuntu

  1. lazyfoo.net” is currently working on an upgraded tutorial set for SDL2.0. For a quick example, see https://gist.github.com/exavolt/2360410
  2. Use the equivalent sdl2-config
  3. Probably not before a stable release during May, so it will take a month in my point of view. So, you’d better build your own

Hope I helped a little :slight_smile:

Thanks All!