1al_set_new_display_option(3)                      al_set_new_display_option(3)
2
3
4

NAME

6       al_set_new_display_option - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              void al_set_new_display_option(int option, int value, int importance)
12

DESCRIPTION

14       Set  an  extra display option, to be used when creating new displays on
15       the calling thread.  Display options differ  from  display  flags,  and
16       specify some details of the context to be created within the window it‐
17       self.  These mainly have no effect on Allegro itself, but you may  want
18       to specify them, for example if you want to use multisampling.
19
20       The 'importance' parameter can be either:
21
22       · ALLEGRO_REQUIRE  - The display will not be created if the setting can
23         not be met.
24
25       · ALLEGRO_SUGGEST - If the setting is not available, the  display  will
26         be created anyway with a setting as close as possible to the request‐
27         ed one.  You can query the actual value used in that case by  calling
28         al_get_display_option(3) after the display has been created.
29
30       · ALLEGRO_DONTCARE  -  If  you  added  a display option with one of the
31         above two settings before, it will be removed again.  Else this  does
32         nothing.
33
34       The supported options are:
35
36       ALLEGRO_COLOR_SIZE
37              This  can  be used to ask for a specific bit depth.  For example
38              to force a 16-bit framebuffer set this to 16.
39
40       ALLEGRO_RED_SIZE,  ALLEGRO_GREEN_SIZE,  ALLEGRO_BLUE_SIZE,  ALLEGRO_AL‐
41       PHA_SIZE
42              Individual color component size in bits.
43
44       ALLEGRO_RED_SHIFT, ALLEGRO_GREEN_SHIFT, ALLEGRO_BLUE_SHIFT, ALLEGRO_AL‐
45       PHA_SHIFT
46              Together with the previous settings these can be used to specify
47              the  exact  pixel layout the display should use.  Normally there
48              is no reason to use these.
49
50       ALLEGRO_ACC_RED_SIZE,  ALLEGRO_ACC_GREEN_SIZE,   ALLEGRO_ACC_BLUE_SIZE,
51       ALLEGRO_ACC_ALPHA_SIZE
52              This  can  be  used  to  define the required accumulation buffer
53              size.
54
55       ALLEGRO_STEREO
56              Whether the display is a stereo display.
57
58       ALLEGRO_AUX_BUFFERS
59              Number of auxiliary buffers the display should have.
60
61       ALLEGRO_DEPTH_SIZE
62              How many depth buffer (z-buffer) bits to use.
63
64       ALLEGRO_STENCIL_SIZE
65              How many bits to use for the stencil buffer.
66
67       ALLEGRO_SAMPLE_BUFFERS
68              Whether to use multisampling (1) or not (0).
69
70       ALLEGRO_SAMPLES
71              If the above is 1, the number of samples to use per pixel.  Else
72              0.
73
74       ALLEGRO_RENDER_METHOD:
75              0 if hardware acceleration is not used with this display.
76
77       ALLEGRO_FLOAT_COLOR
78              Whether to use floating point color components.
79
80       ALLEGRO_FLOAT_DEPTH
81              Whether to use a floating point depth buffer.
82
83       ALLEGRO_SINGLE_BUFFER
84              Whether  the  display uses a single buffer (1) or another update
85              method (0).
86
87       ALLEGRO_SWAP_METHOD
88              If the above is 0, this is set to 1 to indicate the  display  is
89              using a copying method to make the next buffer in the flip chain
90              available, or to 2 to indicate a flipping or other method.
91
92       ALLEGRO_COMPATIBLE_DISPLAY
93              Indicates if Allegro's graphics functions can use this  display.
94              If  you  request a display not useable by Allegro, you can still
95              use for example OpenGL to draw graphics.
96
97       ALLEGRO_UPDATE_DISPLAY_REGION
98              Set to 1 if the display is capable of updating  just  a  region,
99              and  0  if  calling al_update_display_region(3) is equivalent to
100              al_flip_display(3).
101
102       ALLEGRO_VSYNC
103              Set to 1 to tell the driver to wait for  vsync  in  al_flip_dis‐
104              play(3),  or  to  2  to force vsync off.  The default of 0 means
105              that Allegro does not try to modify the vsync behavior so it may
106              be on or off.  Note that even in the case of 1 or 2 it is possi‐
107              ble to override the vsync behavior in the graphics driver so you
108              should not rely on it.
109
110       ALLEGRO_MAX_BITMAP_SIZE
111              When  queried  this  returns  the maximum size (width as well as
112              height) a bitmap can have for this display.   Calls  to  al_cre‐
113              ate_bitmap(3)  or al_load_bitmap(3) for bitmaps larger than this
114              size will fail.  It does not apply to memory bitmaps  which  al‐
115              ways can have arbitrary size (but are slow for drawing).
116
117       ALLEGRO_SUPPORT_NPOT_BITMAP
118              Set to 1 if textures used for bitmaps on this display can have a
119              size which is not a power of two.  This is mostly useful if  you
120              use Allegro to load textures as otherwise only power-of-two tex‐
121              tures will be used internally as bitmap storage.
122
123       ALLEGRO_CAN_DRAW_INTO_BITMAP
124              Set to 1 if you can use al_set_target_bitmap(3)  on  bitmaps  of
125              this  display  to draw into them.  If this is not the case soft‐
126              ware emulation will be used when drawing  into  display  bitmaps
127              (which can be very slow).
128
129       ALLEGRO_SUPPORT_SEPARATE_ALPHA
130              This  is  set to 1 if the al_set_separate_blender(3) function is
131              supported.  Otherwise the alpha parameters will be ignored.
132
133       ALLEGRO_AUTO_CONVERT_BITMAPS
134              This is on by default.  It causes any  existing  memory  bitmaps
135              with  the  ALLEGRO_CONVERT_BITMAP flag to be converted to a dis‐
136              play bitmap of the newly created display with the option set.
137
138              Since: 5.1.0
139
140       ALLEGRO_SUPPORTED_ORIENTATIONS
141              This is a bit-combination of the orientations supported  by  the
142              application.   The  orientations are the same as for al_get_dis‐
143              play_orientation(3) with the additional possibilities:
144
145              · ALLEGRO_DISPLAY_ORIENTATION_PORTRAIT
146
147              · ALLEGRO_DISPLAY_ORIENTATION_LANDSCAPE
148
149              · ALLEGRO_DISPLAY_ORIENTATION_ALL
150
151              PORTRAIT means only the two portrait orientations are supported,
152              LANDSCAPE  means only the two landscape orientations and ALL al‐
153              lows all four orientations.  When the  orientation  changes  be‐
154              tween  a  portrait and a landscape orientation the display needs
155              to be resized.  This is done by  sending  an  ALLEGRO_EVENT_DIS‐
156              PLAY_RESIZE(3) message which should be handled by calling al_ac‐
157              knowledge_resize(3).
158
159              Since: 5.1.0
160
161       ALLEGRO_OPENGL_MAJOR_VERSION
162              Request a specific OpenGL major version.
163
164              Since: 5.1.13
165
166       ALLEGRO_OPENGL_MINOR_VERSION
167              Request a specific OpenGL minor version.
168
169              Since: 5.1.13
170

SEE ALSO

172       al_set_new_display_flags(3), al_get_display_option(3)
173
174
175
176Allegro reference manual                          al_set_new_display_option(3)
Impressum