Crazy Eddie's GUI System  0.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Renderer.h
1 /***********************************************************************
2  filename: CEGUIRenderer.h
3  created: 20/2/2004
4  author: Paul D Turner
5 
6  purpose: Defines interface for abstract Renderer class
7 *************************************************************************/
8 /***************************************************************************
9  * Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining
12  * a copy of this software and associated documentation files (the
13  * "Software"), to deal in the Software without restriction, including
14  * without limitation the rights to use, copy, modify, merge, publish,
15  * distribute, sublicense, and/or sell copies of the Software, and to
16  * permit persons to whom the Software is furnished to do so, subject to
17  * the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be
20  * included in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28  * OTHER DEALINGS IN THE SOFTWARE.
29  ***************************************************************************/
30 #ifndef _CEGUIRenderer_h_
31 #define _CEGUIRenderer_h_
32 
33 #include "CEGUI/Base.h"
34 #include "CEGUI/String.h"
35 #include "CEGUI/Size.h"
36 #include "CEGUI/Vector.h"
37 
38 // Start of CEGUI namespace section
39 namespace CEGUI
40 {
41 //----------------------------------------------------------------------------//
48 {
53 };
54 
55 //----------------------------------------------------------------------------//
56 
63 {
70 };
71 
72 //----------------------------------------------------------------------------//
73 
83 class CEGUIEXPORT Renderer :
84  public AllocatedObject<Renderer>
85 {
86 public:
95  virtual RenderTarget& getDefaultRenderTarget() = 0;
96 
106  virtual GeometryBuffer& createGeometryBuffer() = 0;
107 
118  virtual void destroyGeometryBuffer(const GeometryBuffer& buffer) = 0;
119 
124  virtual void destroyAllGeometryBuffers() = 0;
125 
137  virtual TextureTarget* createTextureTarget() = 0;
138 
148  virtual void destroyTextureTarget(TextureTarget* target) = 0;
149 
154  virtual void destroyAllTextureTargets() = 0;
155 
172  virtual Texture& createTexture(const String& name) = 0;
173 
204  virtual Texture& createTexture(const String& name,
205  const String& filename,
206  const String& resourceGroup) = 0;
207 
233  virtual Texture& createTexture(const String& name, const Sizef& size) = 0;
234 
243  virtual void destroyTexture(Texture& texture) = 0;
244 
253  virtual void destroyTexture(const String& name) = 0;
254 
259  virtual void destroyAllTextures() = 0;
260 
273  virtual Texture& getTexture(const String& name) const = 0;
274 
276  virtual bool isTextureDefined(const String& name) const = 0;
277 
283  virtual void beginRendering() = 0;
284 
289  virtual void endRendering() = 0;
290 
308  virtual void setDisplaySize(const Sizef& size) = 0;
309 
318  virtual const Sizef& getDisplaySize() const = 0;
319 
328  virtual const Vector2f& getDisplayDPI() const = 0;
329 
337  virtual uint getMaxTextureSize() const = 0;
338 
346  virtual const String& getIdentifierString() const = 0;
347 
349  virtual ~Renderer() {}
350 };
351 
352 } // End of CEGUI namespace section
353 
354 
355 #endif // end of guard _CEGUIRenderer_h_