[AD] simplify sub-bitmaps?

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


The attached patch removes the vtable entry for create_sub_bitmap for
the OpenGL driver.

The idea would be to completely get rid of that vtable entry and handle
sub-bitmaps only in the driver independent parts of Allegro. They would
basically just reference their parent (instead of being a full blown
bitmap themselves which just happens to share texture memory, as it is
now).

It also should make it easier to maybe later add functions to
move/resize sub-bitmaps or re-parent them.

For now I didn't test much besides ex_sub_bitmap and the unit tests -
which seem to keep working. So, does anyone see a flaw in this idea? (I
suppose the original reason for doing sub-bitmaps the way they are
right now was possible driver-specific optimizations, but at least the
OpenGL driver didn't seem to do anything.)

If not I'll go ahead and try to do the same with the DX driver. The
patch for that will be quite a bit bigger and maybe I'll find out
the reason they are done the way they are... that's why I'm asking here
first before attempting it :P






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