Hello,
for my work in progress application, I need to rely on fast hardware accelerated blitting operations.
I am currently evaluating the following functions, I wonder which are up to the task:
1) BltBitMapRastPort()
2) BltBitMapTags()
3) CompositeTags()
Any other functions that I am not taking in consideration?
The target is AmigaOS 4.1 Update 1.
Thanks, regards
@Massi
All three functions are hardware accelerated where possible. If you need to scale, rotate, or perform compositing/alpha-blending, then use CompositeTags(). For straight blitting, use the BltBitMap*() functions.
Please note that BltBitMap*() is only HW accelerated if the source and destination bitmaps have the same pixel format. So, converting from 16-bit to 32-bit and vice versa is done in software.
Also note that graphics cards don't always support every available pixel format.
Hans
Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work
@Hans
Thanks for the clear response.
So I guess some code is needed for ensuring the source-destination bitmaps to have the same pixel format, or?
In my case the source bitmap is got via ObtainBitMapSource() / ObtainBitMapInstance() / BitMapInstanceControl(), while the destination bitmap is created by AllocScreenBuffer(), all methods of Intuition which don' t allow to set any specific pixel format.
Is the pixel format of these bitmaps inherited from the underlying screen?
@Massi
The best way to ensure that the source and destination bitmaps have the same pixel format, is to open the window/screen first, and get its pixel format. If your source bitmaps are already in the right format, then great. Otherwise, you can allocate new bitmaps with the same pixel format as the window/screen, and copy the image over.
Hans
Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work
@Hans
Thanks, that sounds like a suitable solution and algorithm.
I personally found the "pixel format" topic a bit messy, whereas overall only few functions explicitily refer to it, in Picasso96 for example, it does exist at mode id / screen / bitmap level.