1set_color_depth(3)              Allegro manual              set_color_depth(3)
2
3
4

NAME

6       set_color_depth  - Sets the global pixel color depth. Allegro game pro‐
7       gramming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void set_color_depth(int depth);
14

DESCRIPTION

16       Sets the pixel format to be used by subsequent calls to  set_gfx_mode()
17       and  create_bitmap(). Valid depths are 8 (the default), 15, 16, 24, and
18       32 bits. Example:
19
20          set_color_depth(32);
21          if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) != 0) {
22             abort_on_error("Couldn't set a 32 bit color resolution");
23          }
24
25       Note that the screen color depth won't change until the next successful
26       call to set_gfx_mode().
27
28

SEE ALSO

30       get_color_depth(3),      set_gfx_mode(3),      set_color_conversion(3),
31       makecol(3), getr(3), desktop_color_depth(3)
32
33
34
35Allegro                          version 4.2.2              set_color_depth(3)
Impressum