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