1al_set_new_bitmap_samples(3) al_set_new_bitmap_samples(3)
2
3
4
6 al_set_new_bitmap_samples - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 void al_set_new_bitmap_samples(int samples)
12 SETTER(new_bitmap_samples, samples)
13
15 Sets the multi-sampling samples used by newly created bitmaps (on the
16 current thread) if they are used with al_set_target_bitmap(3). 0 means
17 multi-sampling will not be used when drawing into the bitmap, which is
18 the default. 1 means multi-sampling will be used but only using a sin‐
19 gle sample per pixel (so usually there will be no visual difference to
20 not using multi-sampling at all).
21
22 Note: Some platforms have restrictions on when the multi-sam‐
23 pling buffer for a bitmap is realized, i.e. down-scaled back to
24 the actual bitmap dimensions. This may only happen after a call
25 to al_set_target_bitmap(3). So for example:
26
27 al_set_target_bitmap(multisample);
28 al_clear_to_color(blue);
29 al_draw_line(0, 0, 100, 100, red, 1);
30 al_lock_bitmap(multisample, ...)
31 // ERROR: the contents of the bitmap will be undefined
32
33 al_set_target_bitmap(backbuffer);
34 al_lock_bitmap(multisample, ...)
35 // CORRECT: at this point, the bitmap contents are updated and
36 // there will be an anti-aliased line in it.
37
39 5.2.1
40
41 [Unstable API]: This is an experimental feature and currently
42 only works for the OpenGL backend.
43
44
45
46Allegro reference manual al_set_new_bitmap_samples(3)