GP2X [sdl] Color Keyed Hw Blits!


synkro

0xdeadbeef
Joined
Aug 26, 2003
Messages
823
Location
Germany
Website
Visit site
If a SDL_Surface has a color key for transparency, then can that surface get blitted by the HW blitter? or: Does the blitter support that on a HW basis?

Following scenario: If the HW blitter could blit those easily (and fast) then creating dedicated sprite versions for different stripple alpha values. As we could benefit from the asynchronous nature of the HW blitter. If a color keyed blit is synchronous anyway, writing a blitting routine with dynamic stripple alpha would be the way to go. If there is a difference in blitting solid bitmaps and color keyed ones: How would that influence the answer of my question here?
 
Last edited by a moderator:
synkro said:
If a SDL_Surface has a color key for transparency, then can that surface get blitted by the HW blitter? or: Does the blitter support that on a HW basis?

Following scenario: If the HW blitter could blit those easily (and fast) then creating dedicated sprite versions for different stripple alpha values. As we could benefit from the asynchronous nature of the HW blitter. If a color keyed blit is synchronous anyway, writing a blitting routine with dynamic stripple alpha would be the way to go. If there is a difference in blitting solid bitmaps and color keyed ones: How would that influence the answer of my question here?


Yes the blitter supports colour keying. Theoretically where there are colour-keyed pixels the blitter doesn't have to bother writing to memory, but unless you have large areas of transparency you'll more than likely not notice any speed change.
I'll answer the other question in it's thread.
 
Last edited by a moderator:
paeryn said:
synkro said:
If a SDL_Surface has a color key for transparency, then can that surface get blitted by the HW blitter? or: Does the blitter support that on a HW basis?

Following scenario: If the HW blitter could blit those easily (and fast) then creating dedicated sprite versions for different stripple alpha values. As we could benefit from the asynchronous nature of the HW blitter. If a color keyed blit is synchronous anyway, writing a blitting routine with dynamic stripple alpha would be the way to go. If there is a difference in blitting solid bitmaps and color keyed ones: How would that influence the answer of my question here?


Yes the blitter supports colour keying. Theoretically where there are colour-keyed pixels the blitter doesn't have to bother writing to memory, but unless you have large areas of transparency you'll more than likely not notice any speed change.
I'll answer the other question in it's thread.


To get thing straight here: The blitter supports colo rkeying. So, as of it's asynchronous nature, shouldn't I very likely notice a speed change in comparison to blitting it "by hand"?
 
Last edited by a moderator:
@ Sphinxter:

Alpha means that the surface drawn darkens or lightens the surface below...it is semitransparent.

Generally it ends up looking like tinted glass because it just changes the color values.

Stipple alpha is another way to accomplish a similar effect and it could be faster. It ends up looking more like a screen door than tinted glass because instead of changing the color values, a grid of pixels is set to be completely transparent.
 
synkro said:
paeryn said:
Yes the blitter supports colour keying. Theoretically where there are colour-keyed pixels the blitter doesn't have to bother writing to memory, but unless you have large areas of transparency you'll more than likely not notice any speed change.

To get thing straight here: The blitter supports color keying. So, as of it's asynchronous nature, shouldn't I very likely notice a speed change in comparison to blitting it "by hand"?

Yes, blitting "by hand" is quite a bit slower. All you need to do is set the surface's colour key and blit as normal, SDL will notice and set the blitter up appropriately. What I meant was that a HW colour-keyed blit is just as fast (and possibly slightly faster) as a normal HW blit.
 
Last edited by a moderator:
Blah said:
@ Sphinxter:

Alpha means that the surface drawn darkens or lightens the surface below...it is semitransparent.

Generally it ends up looking like tinted glass because it just changes the color values.

Stipple alpha is another way to accomplish a similar effect and it could be faster. It ends up looking more like a screen door than tinted glass because instead of changing the color values, a grid of pixels is set to be completely transparent.
Ah, I may have even done some of that, tried to revive an 8bit bmp favorite:
magi.png

people loathed it, sticking to 24 bit color and png after that.
 
Last edited by a moderator:
Back
Top