Re: [AD] [4.9] pitch in memory bitmap

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


The actual value should be transparent to the user - it's only
relevant if the bitmap is locked for direct access and in that case
the pitch is given by the ALLEGRO_LOCKED_REGION structure. The default
should be chosen by Allegro based on the platform, is there any reason
why the user would need to change it?

Pete

On Thu, Feb 21, 2008 at 9:29 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> 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
>
>
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  --
>  https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/