Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

RageTextureID.h

Go to the documentation of this file.
00001 #ifndef RAGE_TEXTURE_ID_H 00002 #define RAGE_TEXTURE_ID_H 00003 00004 /* A unique texture is identified by a RageTextureID. (Loading the 00005 * same file with two different dither settings is considered two 00006 * different textures, for example.) See RageTexture.cpp for explanations 00007 * of these. */ 00008 struct RageTextureID 00009 { 00010 CString filename; 00011 00012 /* Maximum size of the texture, per dimension. */ 00013 int iMaxSize; 00014 00015 /* Generate mipmaps for this texture */ 00016 bool bMipMaps; 00017 00018 /* Maximum number of bits for alpha. In 16-bit modes, lowering 00019 * this gives more bits for color values. (0, 1 or 4) */ 00020 int iAlphaBits; 00021 00022 /* If this is greater than -1, then the image will be loaded as a luma/alpha 00023 * map, eg. I4A4. At most 8 bits per pixel will be used This only actually happens 00024 * when paletted textures are supported. 00025 * 00026 * If the sum of alpha and grayscale bits is <= 4, and the system supports 4-bit 00027 * palettes, then the image will be loaded with 4bpp. 00028 * 00029 * This may be set to 0, resulting in an alpha map with all pixels white. */ 00030 int iGrayscaleBits; 00031 00032 /* Preferred color depth of the image. (This is overridden for 00033 * paletted images and transparencies.) -1 for default. */ 00034 int iColorDepth; 00035 00036 /* If true and color precision is being lost, dither. (slow) */ 00037 bool bDither; 00038 00039 /* If true, resize the image to fill the internal texture. (slow) */ 00040 bool bStretch; 00041 00042 /* If true, enable HOT PINK color keying. (deprecated but needed for 00043 * banners) */ 00044 bool bHotPinkColorKey; /* #FF00FF */ 00045 00046 /* These hints will be used in addition to any in the filename. */ 00047 CString AdditionalTextureHints; 00048 00049 bool operator< (const RageTextureID &rhs) const; 00050 bool operator== (const RageTextureID &rhs) const; 00051 00052 /* Used by RageTextureManager. Order is important; see RageTextureManager.cpp. 00053 * Note that this property is not considered for ordering/equality. Loading 00054 * a texture with a different loading policy will reuse the same texture with 00055 * a different policy. */ 00056 enum TexPolicy { TEX_PERMANENT, TEX_CACHED, TEX_VOLATILE, TEX_DEFAULT } Policy; 00057 00058 void Init(); 00059 00060 RageTextureID() { Init(); } 00061 RageTextureID( const CString &fn ) { Init(); SetFilename(fn); } 00062 void SetFilename( const CString &fn ); 00063 }; 00064 00065 #endif 00066 00067 /* 00068 * Copyright (c) 2003-2004 Chris Danford, Glenn Maynard 00069 * All rights reserved. 00070 * 00071 * Permission is hereby granted, free of charge, to any person obtaining a 00072 * copy of this software and associated documentation files (the 00073 * "Software"), to deal in the Software without restriction, including 00074 * without limitation the rights to use, copy, modify, merge, publish, 00075 * distribute, and/or sell copies of the Software, and to permit persons to 00076 * whom the Software is furnished to do so, provided that the above 00077 * copyright notice(s) and this permission notice appear in all copies of 00078 * the Software and that both the above copyright notice(s) and this 00079 * permission notice appear in supporting documentation. 00080 * 00081 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00082 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00083 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00084 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00085 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00086 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00087 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00088 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00089 * PERFORMANCE OF THIS SOFTWARE. 00090 */

Generated on Thu Jan 27 20:57:29 2005 for StepMania by doxygen 1.3.7