logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

set_color_depth - Sets the global pixel color depth. Allegro game programming library.

Description

       Sets  the pixel format to be used by subsequent calls to set_gfx_mode() and create_bitmap(). Valid depths
       are 8 (the default), 15, 16, 24, and 32 bits. Example:

          set_color_depth(32);
          if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) != 0) {
             abort_on_error("Couldn't set a 32 bit color resolution");
          }

       Note that the screen color depth won't change until the next successful call to set_gfx_mode().

Name

       set_color_depth - Sets the global pixel color depth. Allegro game programming library.

See Also

get_color_depth(3alleg4),   set_gfx_mode(3alleg4),    set_color_conversion(3alleg4),    makecol(3alleg4),
       getr(3alleg4), desktop_color_depth(3alleg4)

Allegro                                           version 4.4.3                         set_color_depth(3alleg4)

Synopsis

#include<allegro.h>voidset_color_depth(intdepth);

See Also