Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUITexture.h

Go to the documentation of this file.
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     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00011     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00012 
00013     This library is free software; you can redistribute it and/or
00014     modify it under the terms of the GNU Lesser General Public
00015     License as published by the Free Software Foundation; either
00016     version 2.1 of the License, or (at your option) any later version.
00017 
00018     This library is distributed in the hope that it will be useful,
00019     but WITHOUT ANY WARRANTY; without even the implied warranty of
00020     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021     Lesser General Public License for more details.
00022 
00023     You should have received a copy of the GNU Lesser General Public
00024     License along with this library; if not, write to the Free Software
00025     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 *************************************************************************/
00027 #ifndef _CEGUITexture_h_
00028 #define _CEGUITexture_h_
00029 
00030 #include "CEGUIBase.h"
00031 #include "CEGUIString.h"
00032 
00033 // Start of CEGUI namespace section
00034 namespace CEGUI
00035 {
00045 class CEGUIEXPORT Texture
00046 {
00047 public:
00048         /*************************************************************************
00049                 Abstract Interface
00050         *************************************************************************/
00058         virtual ushort  getWidth(void) const = 0;
00059 
00060 
00068         virtual ushort  getHeight(void) const = 0;
00069 
00070 
00084         virtual void    loadFromFile(const String& filename, const String& resourceGroup) = 0;
00085 
00086 
00103         virtual void    loadFromMemory(const void* buffPtr, uint buffWidth, uint buffHeight) = 0;
00104 
00105 
00113         Renderer*       getRenderer(void) const                 {return d_owner;}
00114 
00115 
00116 protected:
00117         /*************************************************************************
00118                 Construction and Destruction
00119         *************************************************************************/
00124         Texture(Renderer* owner) : d_owner(owner) {}
00125 
00126 public:         // luabind compatibility
00131         virtual ~Texture(void) {}
00132 
00133 private:
00134         Renderer* d_owner;              //<! Renderer object that created and owns this texture
00135 };
00136 
00137 } // End of  CEGUI namespace section
00138 
00139 #endif  // end of guard _CEGUITexture_h_

Generated on Wed Sep 7 09:56:34 2005 for Crazy Eddies GUI System by  doxygen 1.4.3