File: al_set_new_display_option.3

package info (click to toggle)
allegro5 2%3A5.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,856 kB
  • ctags: 15,948
  • sloc: ansic: 87,540; cpp: 9,693; objc: 3,491; python: 2,057; sh: 829; makefile: 93; perl: 37; pascal: 24
file content (180 lines) | stat: -rw-r--r-- 4,780 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.TH al_set_new_display_option 3 "" "Allegro reference manual"
.SH NAME
.PP
al_set_new_display_option \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

void\ al_set_new_display_option(int\ option,\ int\ value,\ int\ importance)
\f[]
.fi
.SH DESCRIPTION
.PP
Set an extra display option, to be used when creating new displays on
the calling thread.
Display options differ from display flags, and specify some details of
the context to be created within the window itself.
These mainly have no effect on Allegro itself, but you may want to
specify them, for example if you want to use multisampling.
.PP
The \[aq]importance\[aq] parameter can be either:
.IP \[bu] 2
ALLEGRO_REQUIRE \- The display will not be created if the setting can
not be met.
.IP \[bu] 2
ALLEGRO_SUGGEST \- If the setting is not available, the display will be
created anyway.
FIXME: We need a way to query the settings back from a created display.
.IP \[bu] 2
ALLEGRO_DONTCARE \- If you added a display option with one of the above
two settings before, it will be removed again.
Else this does nothing.
.PP
The supported options are:
.TP
.B ALLEGRO_COLOR_SIZE
This can be used to ask for a specific bit depth.
For example to force a 16\-bit framebuffer set this to 16.
.RS
.RE
.TP
.B ALLEGRO_RED_SIZE, ALLEGRO_GREEN_SIZE, ALLEGRO_BLUE_SIZE,
ALLEGRO_ALPHA_SIZE
Individual color component size in bits.
.RS
.RE
.TP
.B ALLEGRO_RED_SHIFT, ALLEGRO_GREEN_SHIFT, ALLEGRO_BLUE_SHIFT,
ALLEGRO_ALPHA_SHIFT
Together with the previous settings these can be used to specify the
exact pixel layout the display should use.
Normally there is no reason to use these.
.RS
.RE
.TP
.B ALLEGRO_ACC_RED_SIZE, ALLEGRO_ACC_GREEN_SIZE, ALLEGRO_ACC_BLUE_SIZE,
ALLEGRO_ACC_ALPHA_SIZE
This can be used to define the required accumulation buffer size.
.RS
.RE
.TP
.B ALLEGRO_STEREO
Whether the display is a stereo display.
.RS
.RE
.TP
.B ALLEGRO_AUX_BUFFERS
Number of auxiliary buffers the display should have.
.RS
.RE
.TP
.B ALLEGRO_DEPTH_SIZE
How many depth buffer (z\-buffer) bits to use.
.RS
.RE
.TP
.B ALLEGRO_STENCIL_SIZE
How many bits to use for the stencil buffer.
.RS
.RE
.TP
.B ALLEGRO_SAMPLE_BUFFERS
Whether to use multisampling (1) or not (0).
.RS
.RE
.TP
.B ALLEGRO_SAMPLES
If the above is 1, the number of samples to use per pixel.
Else 0.
.RS
.RE
.TP
.B ALLEGRO_RENDER_METHOD:
0 if hardware acceleration is not used with this display.
.RS
.RE
.TP
.B ALLEGRO_FLOAT_COLOR
Whether to use floating point color components.
.RS
.RE
.TP
.B ALLEGRO_FLOAT_DEPTH
Whether to use a floating point depth buffer.
.RS
.RE
.TP
.B ALLEGRO_SINGLE_BUFFER
Whether the display uses a single buffer (1) or another update method
(0).
.RS
.RE
.TP
.B ALLEGRO_SWAP_METHOD
If the above is 0, this is set to 1 to indicate the display is using a
copying method to make the next buffer in the flip chain available, or
to 2 to indicate a flipping or other method.
.RS
.RE
.TP
.B ALLEGRO_COMPATIBLE_DISPLAY
Indicates if Allegro\[aq]s graphics functions can use this display.
If you request a display not useable by Allegro, you can still use for
example OpenGL to draw graphics.
.RS
.RE
.TP
.B ALLEGRO_UPDATE_DISPLAY_REGION
Set to 1 if the display is capable of updating just a region, and 0 if
calling al_update_display_region(3) is equivalent to al_flip_display(3).
.RS
.RE
.TP
.B ALLEGRO_VSYNC
Set to 1 to tell the driver to wait for vsync in al_flip_display(3), or
to 2 to force vsync off.
The default of 0 means that Allegro does not try to modify the vsync
behavior so it may be on or off.
Note that even in the case of 1 or 2 it is possible to override the
vsync behavior in the graphics driver so you should not rely on it.
.RS
.RE
.TP
.B ALLEGRO_MAX_BITMAP_SIZE
When queried this returns the maximum size (width as well as height) a
bitmap can have for this display.
Calls to al_create_bitmap(3) or al_load_bitmap(3) for bitmaps larger
than this size will fail.
It does not apply to memory bitmaps which always can have arbitrary size
(but are slow for drawing).
.RS
.RE
.TP
.B ALLEGRO_SUPPORT_NPOT_BITMAP
Set to 1 if textures used for bitmaps on this display can have a size
which is not a power of two.
This is mostly useful if you use Allegro to load textures as otherwise
only power\-of\-two textures will be used internally as bitmap storage.
.RS
.RE
.TP
.B ALLEGRO_CAN_DRAW_INTO_BITMAP
Set to 1 if you can use al_set_target_bitmap(3) on bitmaps of this
display to draw into them.
If this is not the case software emulation will be used when drawing
into display bitmaps (which can be very slow).
.RS
.RE
.TP
.B ALLEGRO_SUPPORT_SEPARATE_ALPHA
This is set to 1 if the al_set_separate_blender(3) function is
supported.
Otherwise the alpha parameters will be ignored.
.RS
.RE
.SH SEE ALSO
.PP
al_set_new_display_flags(3)