Re: [AD] [4.9] pitch in memory bitmap |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-02-21, AJ <aj@xxxxxxxxxx> wrote:
> Peter Hull wrote:
> > As far as I can see there's no pitch (i.e. bytes per line) field in a
> > memory bitmap, but it would be a useful addition, first to save some
> > calculations, and second to allow lines to be aligned say on 32-bit
> > boundaries.
> >
> > What do you think?
> >
>
> I've wanted this for years. so i made my own version of allegro that
> uses 128bit aligned data, this allows me to use SSE2 instructions for
> blending/mixing.
>
> I think its vital to have aligned data.
>
> If you find 128bit to be intolerable as a hard coded value, may i
> suggest a way for the user to specify his alignment requirements ?
How about,
void al_set_new_bitmap_alignment(int alignment);
int al_get_new_bitmap_alignment(void);
Peter