00001 /* 00002 $Id: vidmode.h,v 1.1 2001/03/06 15:09:10 mbn Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00016 00017 #ifndef header_vidmode 00018 #define header_vidmode 00019 00020 #include <string> 00021 #include "../../Core/System/clanstring.h" 00022 00023 class CL_VidMode 00024 //: Video mode class. 00025 // <p>This class is used to describe a videomode in ClanLib.</p> 00026 // 00027 // <p>CL_VidMode is returned from a display card when a list of video modes 00028 // are requested by a call to CL_DisplayCard::get_videomodes().</p> 00029 // 00030 // <p>Note that not all display implementations can give you a list of 00031 // supported modes. If none are requested, you can select whatever mode you 00032 // want. This usually happens when the implementation runs in a window and 00033 // that there's no such thing as a video mode.</p> 00034 { public: 00035 int width; 00036 //: Videomode width. 00037 00038 int height; 00039 //: Videomode height. 00040 00041 int bpp; 00042 //: Videomode depth. 00043 00044 bool mode_x; 00045 //: True if modeX. 00046 00047 CL_VidMode(int width, int height, int bpp, bool mode_x=false) 00048 { 00049 this->width = width; 00050 this->height = height; 00051 this->bpp = bpp; 00052 this->mode_x = mode_x; 00053 } 00054 //: Class Constructor. 00055 // 00060 00061 std::string asString() 00062 { 00063 CL_String ret; 00064 ret << width << " x " << height << " - " << bpp << " bits pr. pixel"; 00065 if (mode_x == true) ret << " (modeX)"; 00066 return ret; 00067 } 00068 //: Converts the video mode description to a string. 00070 }; 00071 00072 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001