[SDL] I/O problem (stdio and stderr redirection to txt files)

Donny Viszneki smirk at thebuicksix.com
Sun Mar 20 20:13:45 PST 2005

On Mar 20, 2005, at 8:50 AM, Tom Wilson wrote:

> I don't think popping up cross-platform message boxes is the solution.

The message boxes are not cross-platform -- the interface is 
cross-platform -- like MOST of SDL.

> All that needs to happen is that the error information needs to be 
> available in memory to the progammer.

> Everyone seems to be trying to solve the needs of users in the SDL 
> *API*.   *SDL is not an application*.

You're logic is just flawed, programmers are writing these things for 
users. If SDL programmers have a concensus

> You just need to be able to know there is an error i.e 
> SDL_SetVideoMode returns 0. So you query the error system (if you 
> want)

> The programmer can then implement a multitude of muti-colured flashing 
> musical message boxes to display the information (if it suits the 
> application).

> Let the application developer decide how to solve the users needs.

And while we're implementing message boxes in the native toolkit of one 
platform, we can reimplement it over and over again for each other 
platform out there! Great idea!

Seriously, and I do mean this seriously: with the exception of Mac OS 
X, I am 99% sure that every GUI environment out there could have a 
message box function with a macro -- what does this mean? It means that 
it would add NOTHING to your program after linking, and like 15 or 20 
lines of code to a single SDL header file. SORRY FOR BLOATING YOUR 

> I for one would stop using SDL if it uncontrollably started popping up 
> message boxes.  Or if the size of the library became bloated by all 
> manner of cross platform widgetry.

> Take a look at DirectX or OpenGL.  When do these API's pop up message 
> boxes?

Clearly, if ever there were a fair comparison, it would be between 
OpenGL and SDL. Let's take a look, shall we?

SDL provides a few flavors of primitive blitting operations, roughly 
equivalent to memcpy and a bit of math. OpenGL provides a 3D rendering 
interface, a shader language for uploading shader programs to video 
memory to be executed by the GPU of your graphics card.

SDL provides threading facilities, sound access, keyboard, joystick, 
and mouse input, window manager interaction, and please, remind me if I 
missed anything. SDL is not really comparable at all to OpenGL. In 
fact, many SDL applications require OpenGL IN SUPPLEMENT TO SDL.

And, while DirectX, in whole or in part, offers many similar facilities 
to that of SDL, let's face it -- it's not similar at all. Really it's 
more comparable to some combination of QuickTime, window manager 
functions, and OpenGL. You aren't the first person to erroneously make 
these comparisons, so don't feel to bad about it.

More information about the SDL mailing list