Crazy Eddie's GUI System  0.8.7
Renderer.h
1 /***********************************************************************
2  created: 20/2/2004
3  author: Paul D Turner
4 
5  purpose: Defines interface for abstract Renderer class
6 *************************************************************************/
7 /***************************************************************************
8  * Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining
11  * a copy of this software and associated documentation files (the
12  * "Software"), to deal in the Software without restriction, including
13  * without limitation the rights to use, copy, modify, merge, publish,
14  * distribute, sublicense, and/or sell copies of the Software, and to
15  * permit persons to whom the Software is furnished to do so, subject to
16  * the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be
19  * included in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27  * OTHER DEALINGS IN THE SOFTWARE.
28  ***************************************************************************/
29 #ifndef _CEGUIRenderer_h_
30 #define _CEGUIRenderer_h_
31 
32 #include "CEGUI/Base.h"
33 #include "CEGUI/String.h"
34 #include "CEGUI/Size.h"
35 #include "CEGUI/Vector.h"
36 
37 // Start of CEGUI namespace section
38 namespace CEGUI
39 {
40 //----------------------------------------------------------------------------//
47 {
52 };
53 
54 //----------------------------------------------------------------------------//
55 
62 {
69 };
70 
71 //----------------------------------------------------------------------------//
72 
82 class CEGUIEXPORT Renderer :
83  public AllocatedObject<Renderer>
84 {
85 public:
94  virtual RenderTarget& getDefaultRenderTarget() = 0;
95 
105  virtual GeometryBuffer& createGeometryBuffer() = 0;
106 
117  virtual void destroyGeometryBuffer(const GeometryBuffer& buffer) = 0;
118 
123  virtual void destroyAllGeometryBuffers() = 0;
124 
136  virtual TextureTarget* createTextureTarget() = 0;
137 
147  virtual void destroyTextureTarget(TextureTarget* target) = 0;
148 
153  virtual void destroyAllTextureTargets() = 0;
154 
171  virtual Texture& createTexture(const String& name) = 0;
172 
203  virtual Texture& createTexture(const String& name,
204  const String& filename,
205  const String& resourceGroup) = 0;
206 
232  virtual Texture& createTexture(const String& name, const Sizef& size) = 0;
233 
242  virtual void destroyTexture(Texture& texture) = 0;
243 
252  virtual void destroyTexture(const String& name) = 0;
253 
258  virtual void destroyAllTextures() = 0;
259 
272  virtual Texture& getTexture(const String& name) const = 0;
273 
275  virtual bool isTextureDefined(const String& name) const = 0;
276 
282  virtual void beginRendering() = 0;
283 
288  virtual void endRendering() = 0;
289 
307  virtual void setDisplaySize(const Sizef& size) = 0;
308 
317  virtual const Sizef& getDisplaySize() const = 0;
318 
327  virtual const Vector2f& getDisplayDPI() const = 0;
328 
336  virtual uint getMaxTextureSize() const = 0;
337 
345  virtual const String& getIdentifierString() const = 0;
346 
348  virtual ~Renderer() {}
349 };
350 
351 } // End of CEGUI namespace section
352 
353 
354 #endif // end of guard _CEGUIRenderer_h_
Definition: MemoryAllocatedObject.h:109
Diagonal split goes from bottom-left to top-right.
Definition: Renderer.h:51
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Diagonal split goes from top-left to bottom-right.
Definition: Renderer.h:49
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:42
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: TextureTarget.h:40
Use blending mode suitable for textures with premultiplied colours.
Definition: Renderer.h:68
QuadSplitMode
Enumerated type that contains the valid diagonal-mode that specify how a quad is split into triangles...
Definition: Renderer.h:46
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:52
Use normal blending mode.
Definition: Renderer.h:66
Abstract class defining the basic required interface for Renderer objects.
Definition: Renderer.h:82
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: Renderer.h:61
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: RenderTarget.h:57
virtual ~Renderer()
Destructor.
Definition: Renderer.h:348
String class used within the GUI system.
Definition: String.h:62
Invalid mode indicator.
Definition: Renderer.h:64