void al_flip_display(void)
Introduced in 5.0.0

Copies or updates the front and back buffers so that what has been drawn previously on the currently selected display becomes visible on screen. Pointers to the special back and front buffer bitmaps remain valid and retain their semantics as back and front buffers respectively, although their contents may have changed.

Several display options change how this function behaves:

With ALLEGRO_SINGLE_BUFFER, no flipping is done. You still have to call this function to display graphics, depending on how the used graphics system works.

The ALLEGRO_SWAP_METHOD option may have additional information about what kind of operation is used internally to flip the front and back buffers.

If ALLEGRO_VSYNC is 1, this function will force waiting for vsync. If ALLEGRO_VSYNC is 2, this function will not wait for vsync. With many drivers the vsync behavior is controlled by the user and not the application, and ALLEGRO_VSYNC will not be set; in this case al_flip_display will wait for vsync depending on the settings set in the system's graphics preferences.

See also: al_set_new_display_flags, al_set_new_display_option

Examples: ex_audio_props, ex_bitmap, ex_bitmap_flip, ex_bitmap_target, ex_blend, ex_blend2, ex_blend_bench, ex_blend_test, ex_blit, ex_clip, ex_color, ex_curl, ex_d3d, ex_disable_screensaver, ex_display_options, ex_draw, ex_drawpixels, ex_draw_bitmap, ex_dualies, ex_expose, ex_filter, ex_font, ex_font_justify, ex_fs_resize, ex_fs_window, ex_gldepth, ex_glext, ex_gp2xwiz, ex_haiku, ex_iphone, ex_joystick_events, ex_joystick_hotplugging, ex_keyboard_focus, ex_lines, ex_lockbitmap, ex_logo, ex_membmp, ex_mixer_pp, ex_mouse, ex_mouse_cursor, ex_mouse_events, ex_mouse_focus, ex_multisample, ex_multiwin, ex_native_filechooser, ex_noframe, ex_ogre3d, ex_opengl, ex_opengl_pixel_shader, ex_physfs, ex_pixelformat, ex_premulalpha, ex_prim, ex_resize, ex_resize2, ex_rotate, ex_scale, ex_stream_seek, ex_subbitmap, ex_synth, ex_threads, ex_threads2, ex_timedwait, ex_timer, ex_transform, ex_ttf, ex_vsync, ex_warp_mouse, ex_windows, ex_winfull

Most helpful discussions:

Other recent discussions: