[SDL] color key broken in glSDL?
David Olofson
david at olofson.net
Mon Oct 16 15:03:53 PDT 2006
On Monday 16 October 2006 15:45, David Olofson wrote:
> On Monday 16 October 2006 11:30, James Gregory wrote:
> [...]
> > Also, in glSDL_BlitFromGL, if dst_rect is 0, dst_rect doesn't get
> > given the width and height of the source rect automatically.
>
> I remember fixing something like this, but I'm not sure... This
> causes incorrect rendering when leaving out the dst_rect, or worse?
>
> Anyway, I'll look into it.
[...later...]
I'm probably too tired for this now, but AFAICT, the destinaction
rectangle w and h fields are never used, as they're passed on to an
SDL_BlitSurface() call, which just ignores them and then overwrites
them with the clipped results.
However, glSDL_BlitFromGL() doesn't do any clipping of the source rect
to the screen, so Bad Things(TM) may well happen if you try to blit
from a completely or partially off-screen area. Oh, and it doesn't
support hardware scaled displays either.
Basically, you're not really supposed to blit from the screen when
using OpenGL. :-)
Even so, "bad" coordinates shouldn't cause crashes, and it would be
pretty nice if you could make screenshots of hardware scaled
displays.
//David Olofson - Programmer, Composer, Open Source Advocate
.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'
More information about the SDL
mailing list