1al_set_new_bitmap_flags(3)                          al_set_new_bitmap_flags(3)
2
3
4

NAME

6       al_set_new_bitmap_flags - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              void al_set_new_bitmap_flags(int flags)
12

DESCRIPTION

14       Sets the flags to use for newly created bitmaps.  Valid flags are:
15
16       ALLEGRO_MEMORY_BITMAP
17              Create  a  bitmap residing in system memory.  Operations on, and
18              with, memory bitmaps will not be hardware accelerated.  However,
19              direct  pixel  access  can be relatively quick compared to video
20              bitmaps, which depend on the display driver in use.
21
22              Note: Allegro's software rendering routines are  currently  very
23              unoptimised.
24
25       ALLEGRO_VIDEO_BITMAP
26              Creates  a  bitmap that resides in the video card memory.  These
27              types of bitmaps receive  the  greatest  benefit  from  hardware
28              acceleration.
29
30              Note:  Creating  a video bitmap will fail if there is no current
31              display or the current display driver cannot create the  bitmap.
32              The  latter  will happen if for example the format or dimensions
33              are not supported.
34
35              Note: Bitmaps created with this flag will be converted to memory
36              bitmaps when the last display is destroyed.  In most cases it is
37              therefore easier to use the ALLEGRO_CONVERT_BITMAP flag instead.
38
39       ALLEGRO_CONVERT_BITMAP
40              This is the default.  It will try to create a video  bitmap  and
41              if that fails create a memory bitmap.  Bitmaps created with this
42              flag when there is no active display will be converted to  video
43              bitmaps  next  time a display is created.  They also will remain
44              video bitmaps if the last display is destroyed and then  another
45              is created again.  Since 5.1.0.
46
47              Note:  You  can  combine this flag with ALLEGRO_MEMORY_BITMAP or
48              ALLEGRO_VIDEO_BITMAP to force the initial type (and fail in  the
49              latter  case  if  no  video bitmap can be created) - but usually
50              neither of those combinations is very useful.
51
52              You can use the display option  ALLEGRO_AUTO_CONVERT_BITMAPS  to
53              control which displays will try to auto-convert bitmaps.
54
55       ALLEGRO_FORCE_LOCKING
56              Does  nothing  since  5.1.8.   Kept  for backwards compatibility
57              only.
58
59       ALLEGRO_NO_PRESERVE_TEXTURE
60              Normally, every effort is taken to preserve the contents of bit‐
61              maps, since some platforms may forget them.  This can take extra
62              processing time.  If you know it  doesn't  matter  if  a  bitmap
63              keeps  its pixel data, for example when it's a temporary buffer,
64              use this flag to tell Allegro not to  attempt  to  preserve  its
65              contents.
66
67       ALLEGRO_ALPHA_TEST
68              This  is a driver hint only.  It tells the graphics driver to do
69              alpha testing instead of alpha blending on bitmaps created  with
70              this  flag.   Alpha  testing  is usually faster and preferred if
71              your bitmaps have only one level of alpha  (0).   This  flag  is
72              currently  not  widely  implemented  (i.e., only for memory bit‐
73              maps).
74
75       ALLEGRO_MIN_LINEAR
76              When drawing a scaled down version of  the  bitmap,  use  linear
77              filtering.   This usually looks better.  You can also combine it
78              with the MIPMAP flag for even better quality.
79
80       ALLEGRO_MAG_LINEAR
81              When drawing a magnified version of a bitmap, use linear filter‐
82              ing.   This will cause the picture to get blurry instead of cre‐
83              ating a big rectangle for each pixel.  It  depends  on  how  you
84              want things to look like whether you want to use this or not.
85
86       ALLEGRO_MIPMAP
87              This  can  only  be used for bitmaps whose width and height is a
88              power of two.  In that case, it will generate  mipmaps  and  use
89              them when drawing scaled down versions.  For example if the bit‐
90              map is 64x64, then extra bitmaps of  sizes  32x32,  16x16,  8x8,
91              4x4, 2x2 and 1x1 will be created always containing a scaled down
92              version of the original.
93

SEE ALSO

95       al_get_new_bitmap_flags(3), al_get_bitmap_flags(3)
96
97
98
99Allegro reference manual                            al_set_new_bitmap_flags(3)
Impressum