al_set_new_display_flags

void al_set_new_display_flags(int flags)
Introduced in 5.0.0

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:

ALLEGRO_WINDOWED

Prefer a windowed mode.

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 will fail if more than one adapter is attempted to be used.

ALLEGRO_FULLSCREEN

Prefer a fullscreen mode.

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.

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.

The passed width and height are only used if the window is switched out of fullscreen mode later but will be ignored initially.

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.

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.

ALLEGRO_RESIZABLE

The display is resizable (only applicable if combined with ALLEGRO_WINDOWED).

ALLEGRO_OPENGL

Require the driver to provide an initialized OpenGL context after returning successfully.

ALLEGRO_OPENGL_3_0

Require the driver to provide an initialized OpenGL context compatible with OpenGL version 3.0.

ALLEGRO_OPENGL_FORWARD_COMPATIBLE

If this flag is set, the OpenGL context created with ALLEGRO_OPENGL_3_0 will be forward compatible only, 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 not be compatible with Allegro drawing routines; the display option ALLEGRO_COMPATIBLE_DISPLAY will be set to false.

ALLEGRO_DIRECT3D

Require the driver to do rendering with Direct3D and provide a Direct3D device.

ALLEGRO_NOFRAME

Try to create a window without a frame (i.e. no border or titlebar). This usualy does nothing for fullscreen modes, and even in windowed moded it depends on the underlying platform whether it is supported or not.

ALLEGRO_GENERATE_EXPOSE_EVENTS

Let the display generate expose events.

0 can be used for default values.

See also: al_set_new_display_option, al_get_display_option

Examples: ex_audio_props, ex_blend2, ex_color, ex_d3d, ex_disable_screensaver, ex_display_options, ex_dualies, ex_expose, ex_font, ex_font_justify, ex_fs_resize, ex_fs_window, ex_gldepth, ex_glext, ex_mouse_cursor, ex_mouse_events, ex_multiwin, ex_noframe, ex_ogre3d, ex_opengl, ex_opengl_pixel_shader, ex_pixelformat, ex_resize, ex_resize2, ex_subbitmap, ex_synth, ex_threads, ex_vsync, ex_warp_mouse, ex_winfull


Most helpful discussions:

Other recent discussions: