Advertisement

SDl + OpenGl

Started by September 02, 2002 07:28 PM
9 comments, last by Evil-Prey 22 years, 5 months ago
Im just curious what the more experienced OpenGl programmers have to say about using an sdl framework and OpenGL rendering. Are there any advantages and disadvantages.
If at first you don't suceed do something easier!.
An advantage is that it allows you to do actual game programming rather than writing code for networking, sound, etc. Also it''s the only real other sound alternative to directx. I tried the windows sound stuff and could not get more than 1 sound playing, and a group I was in tested most of the other sound libraries and ended up using this one. So for sound it''s one of the best, and it gives I believe good networking and timing, etc code.

So in essence it''s at least a good tool for providing the basics/tech while getting the gameplay programming running.

Luigi Pino
The 23rd Dimension
Advertisement
sndPlaySound() plays wav (as special effect, attack effect or any kind of sounds->wavs) and MCI can handle a background music(a midi)

Relative Games - My apps

You can use OpenAL for sound aswell you know lp23...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
I''ll look at OpenAL again, but quick question - can it play mp3''s? I got it going but I needed SDL with SMPEG to play and SDL Mixer to get more than 1 sound going.

Luigi Pino
The 23rd Dimension
OPenAL is not supported on a lot of cards though. I say stick with DirectXSound it isn''t that hard if you get passed all the stupid COM stuff.
Advertisement
OpenAL is being pushed by creative, UT 2003 is using it. It is supported. It was even supported on my old SB128 card.

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
I think this post as led to some controversial between OpenAL, SDL and DirectSound and derived too much from the initial question. SDL is more than just a sound library : it provide message handling, graphics and input control. I would say that it is a good choice if you were programming something to be portable. In fact, that is best strength. As it is also easy to use, it remains a good choice for Windows specific applications. But beware, SDL uses DirectX in Windows so the result of calls to graphic functions is unpredictable (some cards support it as I was told but they are few). I don''t claim SDL is the best, but I''m sure it can suit your needs.

Also if you want some networking check HawkNL on www.hawksoft.com.



C4ctusAl

What about some trouble ?
C4ctusAlWhat about some trouble ?
SDL does networking too I believe, and early this year when we were checking about networking, HawkNL was hard to compile and didn''t have very much info documentation wise. It probably has changed but looking over the forums at the site it seems it hasn''t. Better still would be writing your own library using winsock for windows, and other socket stuff for other os games. But as always when cross-platforming check the endian, oh and another quick tip - bool = 1 = 4...

Let a new derivation begin
And if doing your own networking - best guide : http://www.ecst.csuchico.edu/~beej/guide/net/

Luigi Pino
The 23rd Dimension
SDL doesn''t support networking as of current version.
C4ctusAlWhat about some trouble ?

This topic is closed to new replies.

Advertisement