GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
desktop_color_depth(3) Allegro manual desktop_color_depth(3)

desktop_color_depth - Finds out the desktop color depth. Allegro game programming library.

#include <allegro.h>

int desktop_color_depth();

Finds out the currently selected desktop color depth. You can use this information to make your program use the same color depth as the desktop, which will likely make it run faster because the graphic driver won't be doing unnecessary color conversions behind your back.

Under some OSes, switching to a full screen graphics mode may automatically change the desktop color depth. You have, therefore, to call this function before setting any graphics mode in order to retrieve the real desktop color depth. Example:

   allegro_init();
   ...
   if ((depth = desktop_color_depth()) != 0) {
      set_color_depth(depth);
   }

Returns the color depth or zero on platforms where this information is not available or does not apply.

get_desktop_resolution(3), set_color_depth(3), set_gfx_mode(3)
version 4.4.3 Allegro

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.