2 Questions concerning Overlays

Hi,

1.) is it possible to have 2 overlays running at the same time? I mean e.g.
One animation filling the whole screen and one just using the corner and
hiding the big animation overlay behind itself.

I’ve tried to do this by creating 2 overlays and displaying them alternating.
The result is, that the big overlay overwrites the small and that the small
one makes the big overlay invisible

2.) is it possible to draw normal pixels on top of an overlay. e.g. subtexts
or control elements could be drawn onto the blue pixels that are used by the
overlay.

Absolutely no resulty in my tries to do this

Btw How are the overlays working exactly. Where do the blue, or what ever
colored, pixels come from. Are they really in video memory. As far as I
understand it, the overlay is visible in that places the blue pixels are
visible. An the overlay itself is not in video memory but rather "beamed"
into the picture somewhere on it’s way to the screen.

Thanks Andreas_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Hi,

1.) is it possible to have 2 overlays running at the same time? I mean e.g.
One animation filling the whole screen and one just using the corner and
hiding the big animation overlay behind itself.

Nope, SDL currently only supports one overlay at a time.

2.) is it possible to draw normal pixels on top of an overlay. e.g. subtexts
or control elements could be drawn onto the blue pixels that are used by the
overlay.

Nope, it’s not even possible to do this with some hardware.

Btw How are the overlays working exactly. Where do the blue, or what ever
colored, pixels come from. Are they really in video memory. As far as I
understand it, the overlay is visible in that places the blue pixels are
visible. An the overlay itself is not in video memory but rather "beamed"
into the picture somewhere on it’s way to the screen.

The blue pixels are a colorkey generated by the graphics server, and the
hardware knows to replace the colorkey with the video overlay internally.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Andreas R?ver wrote:

Hi,

1.) is it possible to have 2 overlays running at the same time? I mean e.g.
One animation filling the whole screen and one just using the corner and
hiding the big animation overlay behind itself.

Hi I wanted to do eactly the same. The only way I found was to create a
struct called SDLYUVSurface.
This like an overlay but without any screen reference (It’s only a piece
of memory for Y U and V components)
I also wrote a function to blit an SDLYUVSurface to an overlay, so I can
add subtext, pictures… to my main overlay.

I also have a function to convert RGB surfaces to YUV surfaces. It’s in
C it’s ugly but it works quite good now.

All this works only for YUV 4.2.0 overlays (YV12 flag).

I’ve tried to do this by creating 2 overlays and displaying them alternating.
The result is, that the big overlay overwrites the small and that the small
one makes the big overlay invisible

I tried too, but the screen was flinking and the blue color appeared
when destroying one overlay.

If you’re interested, I’ll send my code to you.–
Xavier