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

CEGUIRenderer.h

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIRenderer.h
00003         created:        20/2/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Defines interface for abstract Renderer class
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #ifndef _CEGUIRenderer_h_
00027 #define _CEGUIRenderer_h_
00028 
00029 #include "CEGUIBase.h"
00030 #include "CEGUIString.h"
00031 #include "CEGUIRect.h"
00032 #include "CEGUIColourRect.h"
00033 #include "CEGUIEventSet.h"
00034 
00035 
00036 // Start of CEGUI namespace section
00037 namespace CEGUI
00038 {
00047 class CEGUIBASE_API Renderer : public EventSet
00048 {
00049 public:
00050         static const String EventNamespace;                             
00051 
00052         /*************************************************************************
00053                 Event name constants
00054         *************************************************************************/
00061         static const String EventDisplaySizeChanged;
00062 
00063 
00064         /*************************************************************************
00065                 Abstract interface methods
00066         *************************************************************************/
00092         virtual void    addQuad(const Rect& dest_rect, float z, const Texture* tex, const Rect& texture_rect, const ColourRect& colours, QuadSplitMode quad_split_mode) = 0;
00093 
00094 
00104         virtual void    doRender(void) = 0;
00105 
00106 
00114         virtual void    clearRenderList(void) = 0;
00115 
00116 
00132         virtual void    setQueueingEnabled(bool setting) = 0;
00133 
00134 
00143         virtual Texture*        createTexture(void) = 0;
00144 
00145 
00165         virtual Texture*        createTexture(const String& filename, const String& resourceGroup) = 0;
00166 
00167 
00183         virtual Texture*        createTexture(float size) = 0;
00184 
00185 
00196         virtual void            destroyTexture(Texture* texture) = 0;
00197 
00198         
00206         virtual void            destroyAllTextures(void) = 0;
00207 
00208 
00216         virtual bool    isQueueingEnabled(void) const = 0;
00217 
00218 
00226         virtual float   getWidth(void) const    = 0;
00227 
00228 
00236         virtual float   getHeight(void) const   = 0;
00237 
00238 
00246         virtual Size    getSize(void) const             = 0;
00247 
00248 
00257         virtual Rect    getRect(void) const             = 0;
00258 
00259 
00267         virtual uint    getMaxTextureSize(void) const   = 0;
00268 
00269 
00277         virtual uint    getHorzScreenDPI(void) const    = 0;
00278 
00279 
00287         virtual uint    getVertScreenDPI(void) const    = 0;
00288 
00289 
00290         /*************************************************************************
00291                 Basic stuff we provide in base class
00292         *************************************************************************/
00300         void    resetZValue(void)                               {d_current_z = GuiZInitialValue;}
00301 
00302 
00310         void    advanceZValue(void)                             {d_current_z -= GuiZElementStep;}
00311 
00312 
00320         float   getCurrentZ(void) const                 {return d_current_z;}
00321 
00322 
00334         float   getZLayer(uint layer) const             {return d_current_z - ((float)layer * GuiZLayerStep);}
00335 
00336     virtual ResourceProvider* createResourceProvider(void);
00337 
00338 protected:
00339         /*************************************************************************
00340                 Construction and Destruction
00341         *************************************************************************/
00342         Renderer(void);
00343 
00344 public:         // for luabind support
00345         virtual ~Renderer(void);
00346 
00347 private:
00348         /*************************************************************************
00349                 Implementation constants
00350         *************************************************************************/
00351         static const float      GuiZInitialValue;               
00352         static const float      GuiZElementStep;                
00353         static const float      GuiZLayerStep;                  
00354 
00355 
00356         /*************************************************************************
00357                 Implementation Data
00358         *************************************************************************/
00359         float   d_current_z;            
00360 
00361 protected:
00362     ResourceProvider* d_resourceProvider;      
00363 };
00364 
00365 } // End of  CEGUI namespace section
00366 
00367 
00368 #endif  // end of guard _CEGUIRenderer_h_

Generated on Wed Feb 16 12:41:07 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1