00001 /* RageBitmapTexture: Holder for a static texture with metadata. */ 00002 00003 #ifndef RAGEBITMAPTEXTURE_H 00004 #define RAGEBITMAPTEXTURE_H 00005 00006 #include "RageTexture.h" 00007 00008 class RageBitmapTexture : public RageTexture 00009 { 00010 public: 00011 RageBitmapTexture( RageTextureID name ); 00012 virtual ~RageBitmapTexture(); 00013 /* only called by RageTextureManager::InvalidateTextures */ 00014 virtual void Invalidate() { m_uTexHandle = 0; /* don't Destroy() */} 00015 virtual void Reload(); 00016 virtual unsigned GetTexHandle() const { return m_uTexHandle; }; // accessed by RageDisplay 00017 00018 private: 00019 void Create(); // called by constructor and Reload 00020 void Destroy(); 00021 unsigned m_uTexHandle; // treat as unsigned in OpenGL, ID3D8Texture* for D3D 00022 }; 00023 00024 #endif 00025 00026 /* 00027 * Copyright (c) 2001-2004 Chris Danford, Glenn Maynard 00028 * All rights reserved. 00029 * 00030 * Permission is hereby granted, free of charge, to any person obtaining a 00031 * copy of this software and associated documentation files (the 00032 * "Software"), to deal in the Software without restriction, including 00033 * without limitation the rights to use, copy, modify, merge, publish, 00034 * distribute, and/or sell copies of the Software, and to permit persons to 00035 * whom the Software is furnished to do so, provided that the above 00036 * copyright notice(s) and this permission notice appear in all copies of 00037 * the Software and that both the above copyright notice(s) and this 00038 * permission notice appear in supporting documentation. 00039 * 00040 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00041 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00042 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00043 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00044 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00045 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00046 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00047 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00048 * PERFORMANCE OF THIS SOFTWARE. 00049 */ 00050