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

SEE ALSO

169       al_set_new_display_flags(3), al_get_display_option(3)
170
171
172
173Allegro reference manual                          al_set_new_display_option(3)
Impressum