Crazy Eddies GUI System  0.7.7
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_