Porting to SDL

hi`

I thought about porting the available source for OpenUT (available at
sourceforge) to SDL (I can’t believe I write this ;—)) as this might
solve some problems with sound and the fullscreen support. So my
question is whether SDLs OpenGL support is advanced enough for what I
need (I want to set some values in visual requesting like minimal depth
buffer size and stuff) and if you (especially Sam) think that this might
be a good idea.

pro:

  • more stable fullscreen and mouse capture support
  • better sound support
  • mikmod support if I am right (is this true?)

contra:

  • dependend on SDL
  • some work
  • bad karma for me :wink:

as some people on the OpenUT list might think that porting to SDL might
be a bad thing I want to add that I am a biased person as I am on the
ClanLib development team and as I was the guy trying to port CivCTP from
using SDL to use ClanLib. So believe me if I want to port to SDL there
has to be a reason for that besides just porting itself ;—)–
Daniel Vogel

666 @ http://grafzahl.de

I thought about porting the available source for OpenUT (available at
sourceforge) to SDL (I can’t believe I write this ;—)) as this might
solve some problems with sound and the fullscreen support. So my
question is whether SDLs OpenGL support is advanced enough for what I
need (I want to set some values in visual requesting like minimal depth
buffer size and stuff) and if you (especially Sam) think that this might
be a good idea.

Wow! Daniel! :slight_smile:
Yes, the OpenGL support is definitely advanced enough.
Just set the video mode with the SDL_OPENGL flag, perform all your normal
OpenGL work, and use SDL_GL_SwapBuffers() instead of glxSwapBuffers().
No muss, no fuss. :slight_smile:

Check out the testgl program in the test subdirectory for a simple example
of how this works. I’m going to put a series of OpenGL tutorials on the
SDL website as soon as the Win32 support is done and I release SDL 1.1.0.

pro:

  • more stable fullscreen and mouse capture support

Yup

  • better sound support

Yup

  • mikmod support if I am right (is this true?)

This is only if you use the SDLmixer library, but yes.
If you want to have mikmod support, you need to use the SDLmixer API,
and set up a post-mixer callback which does the actual mixing into a
buffer already containing the mikmod sound data. It’s a little tricky,
but if you really want mikmod support, it would be the way to do it.

contra:

  • dependend on SDL
  • some work
  • bad karma for me :wink:

:slight_smile:

as some people on the OpenUT list might think that porting to SDL might
be a bad thing I want to add that I am a biased person as I am on the
ClanLib development team and as I was the guy trying to port CivCTP from
using SDL to use ClanLib. So believe me if I want to port to SDL there
has to be a reason for that besides just porting itself ;—)

See ya! :slight_smile:
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec