File: al_set_new_display_flags.3

package info (click to toggle)
allegro5 2%3A5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,032 kB
  • sloc: ansic: 120,340; cpp: 15,707; objc: 4,805; python: 2,915; java: 2,195; sh: 887; xml: 86; makefile: 49; perl: 37; pascal: 24
file content (165 lines) | stat: -rw-r--r-- 4,685 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
.TH "al_set_new_display_flags" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_set_new_display_flags \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

void\ al_set_new_display_flags(int\ flags)
\f[]
.fi
.SH DESCRIPTION
.PP
Sets various flags to be used when creating new displays on the calling
thread.
flags is a bitfield containing any reasonable combination of the
following:
.TP
.B ALLEGRO_WINDOWED
Prefer a windowed mode.
.RS
.PP
Under multi\-head X (not XRandR/TwinView), the use of more than one
adapter is impossible due to bugs in X and GLX.
al_create_display(3) will fail if more than one adapter is attempted to
be used.
.RE
.TP
.B ALLEGRO_FULLSCREEN_WINDOW
Make the window span the entire screen.
Unlike ALLEGRO_FULLSCREEN this will never attempt to modify the screen
resolution.
Instead the pixel dimensions of the created display will be the same as
the desktop.
.RS
.PP
The passed width and height are only used if the window is switched out
of fullscreen mode later but will be ignored initially.
.PP
Under Windows and X11 a fullscreen display created with this flag will
behave differently from one created with the ALLEGRO_FULLSCREEN flag \-
even if the ALLEGRO_FULLSCREEN display is passed the desktop dimensions.
The exact difference is platform dependent, but some things which may be
different is how alt\-tab works, how fast you can toggle between
fullscreen/windowed mode or how additional monitors behave while your
display is in fullscreen mode.
.PP
Additionally under X, the use of more than one adapter in multi\-head
mode or with true Xinerama enabled is impossible due to bugs in X/GLX,
creation will fail if more than one adapter is attempted to be used.
.RE
.TP
.B ALLEGRO_FULLSCREEN
Prefer a fullscreen mode.
.RS
.PP
Under X the use of more than one FULLSCREEN display when using
multi\-head X, or true Xinerama is not possible due to bugs in X and
GLX, display creation will fail if more than one adapter is attempted to
be used.
.RS
.PP
\f[I]Note:\f[] Prefer using ALLEGRO_FULLSCREEN_WINDOW as it typically
provides a better user experience as the monitor doesn\[aq]t change
resolution and switching away from your game via Alt\-Tab works
smoothly.
ALLEGRO_FULLSCREEN is typically less well supported compared to
ALLEGRO_FULLSCREEN_WINDOW.
.RE
.RE
.TP
.B ALLEGRO_RESIZABLE
The display is resizable (only applicable if combined with
ALLEGRO_WINDOWED).
.RS
.RE
.TP
.B ALLEGRO_MAXIMIZED
The display window will be maximized (only applicable if combined with
ALLEGRO_RESIZABLE).
Since: 5.1.12
.RS
.RE
.TP
.B ALLEGRO_OPENGL
Require the driver to provide an initialized OpenGL context after
returning successfully.
.RS
.RE
.TP
.B ALLEGRO_OPENGL_3_0
Require the driver to provide an initialized OpenGL context compatible
with OpenGL version 3.0.
.RS
.RE
.TP
.B ALLEGRO_OPENGL_FORWARD_COMPATIBLE
If this flag is set, the OpenGL context created with ALLEGRO_OPENGL_3_0
will be forward compatible \f[I]only\f[], meaning that all of the OpenGL
API declared deprecated in OpenGL 3.0 will not be supported.
Currently, a display created with this flag will \f[I]not\f[] be
compatible with Allegro drawing routines; the display option
ALLEGRO_COMPATIBLE_DISPLAY will be set to false.
.RS
.RE
.TP
.B ALLEGRO_OPENGL_ES_PROFILE
Used together with ALLEGRO_OPENGL, requests that the OpenGL context uses
the OpenGL ES profile.
A specific version can be requested with al_set_new_display_option(3).
Note: Currently this is only supported by the X11/GLX driver.
Since: 5.1.13
.RS
.RE
.TP
.B ALLEGRO_DIRECT3D
Require the driver to do rendering with Direct3D and provide a Direct3D
device.
.RS
.RE
.TP
.B ALLEGRO_PROGRAMMABLE_PIPELINE
Require a programmable graphics pipeline.
This flag is required to use ALLEGRO_SHADER(3) objects.
Since: 5.1.6
.RS
.RE
.TP
.B ALLEGRO_FRAMELESS
Try to create a window without a frame (i.e.
no border or titlebar).
This usually does nothing for fullscreen modes, and even in windowed
modes it depends on the underlying platform whether it is supported or
not.
Since: 5.0.7, 5.1.2
.RS
.RE
.TP
.B ALLEGRO_NOFRAME
Original name for ALLEGRO_FRAMELESS.
This works with older versions of Allegro.
.RS
.RE
.TP
.B ALLEGRO_GENERATE_EXPOSE_EVENTS
Let the display generate expose events.
.RS
.RE
.TP
.B ALLEGRO_GTK_TOPLEVEL
Create a GTK toplevel window for the display, on X.
This flag is conditionally defined by the native dialog addon.
You must call al_init_native_dialog_addon(3) for it to succeed.
ALLEGRO_GTK_TOPLEVEL is incompatible with ALLEGRO_FULLSCREEN.
Since: 5.1.5
.RS
.RE
.PP
0 can be used for default values.
.SH SEE ALSO
.PP
al_set_new_display_option(3), al_get_display_option(3),
al_set_display_option(3)