Crazy Eddies GUI System 0.7.5
|
00001 /*********************************************************************** 00002 filename: CEGUITexture.h 00003 created: 21/2/2004 00004 author: Paul D Turner 00005 00006 purpose: Defines abstract interface for texture objects. Texture 00007 objects are created & destroyed by the Renderer. 00008 *************************************************************************/ 00009 /*************************************************************************** 00010 * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team 00011 * 00012 * Permission is hereby granted, free of charge, to any person obtaining 00013 * a copy of this software and associated documentation files (the 00014 * "Software"), to deal in the Software without restriction, including 00015 * without limitation the rights to use, copy, modify, merge, publish, 00016 * distribute, sublicense, and/or sell copies of the Software, and to 00017 * permit persons to whom the Software is furnished to do so, subject to 00018 * the following conditions: 00019 * 00020 * The above copyright notice and this permission notice shall be 00021 * included in all copies or substantial portions of the Software. 00022 * 00023 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00024 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00025 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00026 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 00027 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00028 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00029 * OTHER DEALINGS IN THE SOFTWARE. 00030 ***************************************************************************/ 00031 #ifndef _CEGUITexture_h_ 00032 #define _CEGUITexture_h_ 00033 00034 #include "CEGUIBase.h" 00035 #include "CEGUIString.h" 00036 00037 // Start of CEGUI namespace section 00038 namespace CEGUI 00039 { 00050 class CEGUIEXPORT Texture 00051 { 00052 public: 00058 enum PixelFormat 00059 { 00061 PF_RGB, 00063 PF_RGBA 00064 }; 00065 00074 virtual const Size& getSize() const = 0; 00075 00084 virtual const Size& getOriginalDataSize() const = 0; 00085 00095 virtual const Vector2& getTexelScaling() const = 0; 00096 00112 virtual void loadFromFile(const String& filename, 00113 const String& resourceGroup) = 0; 00114 00132 virtual void loadFromMemory(const void* buffer, 00133 const Size& buffer_size, 00134 PixelFormat pixel_format) = 0; 00135 00146 virtual void saveToMemory(void* buffer) = 0; 00147 00152 virtual ~Texture() {} 00153 }; 00154 00155 } // End of CEGUI namespace section 00156 00157 #endif // end of guard _CEGUITexture_h_