[SDL] glSDL backend

Stephane Marchesin stephane.marchesin at wanadoo.fr
Tue Jan 11 10:11:18 PST 2005

Gaetan de Menten wrote:

>>You don't seem to have 3d acceleration correctly setup. You should load
>>the dri module in your X configuration file.
>I got the Nvidia closed source drivers and they explicitly say not to
>load the dri module, but I guess this is pretty much off topic...
Hmm, I assumed that was the DRI drivers. Anyway as you said, it's off topic.

>>The semantics when mixing colorkey and alpha is explained in large
>>detail in the SDL_SetAlpha manpage.
>>It depends on the format of the source and destination surfaces, not
>>only on the flags that are set.
>I think you misunderstood what I said... I was probably unclear but I
>really think there is a problem... The semantics are what I thought
>they were, and even if I got the semantics wrong (I don't think I do),
>you'll have to explain me how a call to "SDL_SetAlpha(Surface, 0,
>255)" can result in an alpha blended sprite...
>Again, it looks like the call is totally ignored (the previous alpha
>value is used) when
>the SDL_SRCALPHA is not present, instead of IN THIS CASE (alpha = 255)
>"setting up" the surface as opaque.
>Btw: this problem is, of course, only present with the glSDL backend
>and not in any  other backend I tried (otherwise I wouldn't have
>reported it as an answer to your mail).

Ok, Id' like to have the full source code reproducing the problem 
(including the surface creation code, that's important).
It would be nice if it could compile out of the box, because I don't 
have too much free time currently :)

>>I think we have most of the pitfalls described there :
>>And yes, most of the advice there also applies to non-glSDL situations.
>I had already read that page since you mentioned it in your first
>mail... (it's a pretty nice page, btw). But I think some pitfalls of
>hardware surfaces are not mentioned.   Isn't there a problem with lost
>surfaces on the DirectDraw backend (or something like that)?
Well, DirectDraw surely causes problems ;) but :
- if the surface is lost, it can very well be recreated exactly as it 
was before (in particular, it can be recreated as a hardware surface) by 
reloading the artwork. This is clearly stated in the directdraw docs.
- losing surfaces only happens during long program inactivity or when 
you alt-tab a fullscreen apps and such...

So in short, that's not a performance problem (we're talking about 
performace, aren't we ?).


More information about the SDL mailing list