Crazy Eddies GUI System  0.7.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CEGUINullRenderer.h
1 /***********************************************************************
2  filename: CEGUINullRenderer.h
3  created: Fri Jan 15 2010
4  author: Eugene Marcotte
5 *************************************************************************/
6 /***************************************************************************
7  * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining
10  * a copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26  * OTHER DEALINGS IN THE SOFTWARE.
27  ***************************************************************************/
28 #ifndef _CEGUINullRenderer_h_
29 #define _CEGUINullRenderer_h_
30 
31 #include "../../CEGUIRenderer.h"
32 #include "../../CEGUISize.h"
33 #include "../../CEGUIVector.h"
34 
35 #include <vector>
36 #include <map>
37 
38 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
39 # ifdef NULL_GUIRENDERER_EXPORTS
40 # define NULL_GUIRENDERER_API __declspec(dllexport)
41 # else
42 # define NULL_GUIRENDERER_API __declspec(dllimport)
43 # endif
44 #else
45 # define NULL_GUIRENDERER_API
46 #endif
47 
48 #if defined(_MSC_VER)
49 # pragma warning(push)
50 # pragma warning(disable : 4251)
51 #endif
52 
53 
54 // Start of CEGUI namespace section
55 namespace CEGUI
56 {
57 class NullGeometryBuffer;
58 class NullTexture;
59 class NullRenderTarget;
60 
62 class NULL_GUIRENDERER_API NullRenderer : public Renderer
63 {
64 public:
79  static NullRenderer& bootstrapSystem();
80 
96  static void destroySystem();
97 
102  static NullRenderer& create();
103 
105  static void destroy(NullRenderer& renderer);
106 
107  // implement CEGUI::Renderer interface
108  RenderingRoot& getDefaultRenderingRoot();
109  GeometryBuffer& createGeometryBuffer();
110  void destroyGeometryBuffer(const GeometryBuffer& buffer);
111  void destroyAllGeometryBuffers();
112  TextureTarget* createTextureTarget();
113  void destroyTextureTarget(TextureTarget* target);
114  void destroyAllTextureTargets();
115  Texture& createTexture();
116  Texture& createTexture(const String& filename, const String& resourceGroup);
117  Texture& createTexture(const Size& size);
118  void destroyTexture(Texture& texture);
119  void destroyAllTextures();
120  void beginRendering();
121  void endRendering();
122  void setDisplaySize(const Size& sz);
123  const Size& getDisplaySize() const;
124  const Vector2& getDisplayDPI() const;
125  uint getMaxTextureSize() const;
126  const String& getIdentifierString() const;
127 
128 protected:
130  NullRenderer();
132  void constructor_impl();
134  virtual ~NullRenderer();
135 
147  typedef std::vector<TextureTarget*> TextureTargetList;
151  typedef std::vector<NullGeometryBuffer*> GeometryBufferList;
155  typedef std::vector<NullTexture*> TextureList;
160 };
161 
162 
163 } // End of CEGUI namespace section
164 
165 #if defined(_MSC_VER)
166 # pragma warning(pop)
167 #endif
168 
169 #endif // end of guard _CEGUINullRenderer_h_
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
Size d_displaySize
What the renderer considers to be the current display size.
Definition: CEGUINullRenderer.h:139
Intermediate RenderTarget.
Definition: CEGUINullRenderTarget.h:39
std::vector< NullGeometryBuffer * > GeometryBufferList
container type used to hold GeometryBuffers we create.
Definition: CEGUINullRenderer.h:151
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: CEGUIGeometryBuffer.h:42
TextureList d_textures
Container used to track textures.
Definition: CEGUINullRenderer.h:157
NullRenderTarget * d_defaultTarget
The default RenderTarget (used by d_defaultRoot)
Definition: CEGUINullRenderer.h:145
Class that holds the size (width &amp; height) of something.
Definition: CEGUISize.h:43
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: CEGUITextureTarget.h:41
std::vector< TextureTarget * > TextureTargetList
container type used to hold TextureTargets we create.
Definition: CEGUINullRenderer.h:147
GeometryBufferList d_geometryBuffers
Container used to track geometry buffers.
Definition: CEGUINullRenderer.h:153
std::vector< NullTexture * > TextureList
container type used to hold Textures we create.
Definition: CEGUINullRenderer.h:155
TextureTargetList d_textureTargets
Container used to track texture targets.
Definition: CEGUINullRenderer.h:149
Abstract base class specifying the required interface for Texture objects.
Definition: CEGUITexture.h:50
static String d_rendererID
String holding the renderer identification text.
Definition: CEGUINullRenderer.h:137
CEGUI::Renderer implementation for no particular engine.
Definition: CEGUINullRenderer.h:62
Abstract class defining the basic required interface for Renderer objects.
Definition: CEGUIRenderer.h:80
uint d_maxTextureSize
What the renderer thinks the max texture size is.
Definition: CEGUINullRenderer.h:159
Definition: CEGUIRenderingRoot.h:36
Vector2 d_displayDPI
What the renderer considers to be the current display DPI resolution.
Definition: CEGUINullRenderer.h:141
RenderingRoot * d_defaultRoot
The default rendering root object.
Definition: CEGUINullRenderer.h:143
String class used within the GUI system.
Definition: CEGUIString.h:57