Crazy Eddie's GUI System
0.8.4
|
00001 /*********************************************************************** 00002 created: 20/2/2004 00003 author: Paul D Turner 00004 00005 purpose: Defines interface for abstract Renderer class 00006 *************************************************************************/ 00007 /*************************************************************************** 00008 * Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team 00009 * 00010 * Permission is hereby granted, free of charge, to any person obtaining 00011 * a copy of this software and associated documentation files (the 00012 * "Software"), to deal in the Software without restriction, including 00013 * without limitation the rights to use, copy, modify, merge, publish, 00014 * distribute, sublicense, and/or sell copies of the Software, and to 00015 * permit persons to whom the Software is furnished to do so, subject to 00016 * the following conditions: 00017 * 00018 * The above copyright notice and this permission notice shall be 00019 * included in all copies or substantial portions of the Software. 00020 * 00021 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00022 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00023 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00024 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 00025 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00026 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00027 * OTHER DEALINGS IN THE SOFTWARE. 00028 ***************************************************************************/ 00029 #ifndef _CEGUIRenderer_h_ 00030 #define _CEGUIRenderer_h_ 00031 00032 #include "CEGUI/Base.h" 00033 #include "CEGUI/String.h" 00034 #include "CEGUI/Size.h" 00035 #include "CEGUI/Vector.h" 00036 00037 // Start of CEGUI namespace section 00038 namespace CEGUI 00039 { 00040 //----------------------------------------------------------------------------// 00046 enum QuadSplitMode 00047 { 00049 TopLeftToBottomRight, 00051 BottomLeftToTopRight 00052 }; 00053 00054 //----------------------------------------------------------------------------// 00055 00061 enum BlendMode 00062 { 00064 BM_INVALID, 00066 BM_NORMAL, 00068 BM_RTT_PREMULTIPLIED 00069 }; 00070 00071 //----------------------------------------------------------------------------// 00072 00082 class CEGUIEXPORT Renderer : 00083 public AllocatedObject<Renderer> 00084 { 00085 public: 00094 virtual RenderTarget& getDefaultRenderTarget() = 0; 00095 00105 virtual GeometryBuffer& createGeometryBuffer() = 0; 00106 00117 virtual void destroyGeometryBuffer(const GeometryBuffer& buffer) = 0; 00118 00123 virtual void destroyAllGeometryBuffers() = 0; 00124 00136 virtual TextureTarget* createTextureTarget() = 0; 00137 00147 virtual void destroyTextureTarget(TextureTarget* target) = 0; 00148 00153 virtual void destroyAllTextureTargets() = 0; 00154 00171 virtual Texture& createTexture(const String& name) = 0; 00172 00203 virtual Texture& createTexture(const String& name, 00204 const String& filename, 00205 const String& resourceGroup) = 0; 00206 00232 virtual Texture& createTexture(const String& name, const Sizef& size) = 0; 00233 00242 virtual void destroyTexture(Texture& texture) = 0; 00243 00252 virtual void destroyTexture(const String& name) = 0; 00253 00258 virtual void destroyAllTextures() = 0; 00259 00272 virtual Texture& getTexture(const String& name) const = 0; 00273 00275 virtual bool isTextureDefined(const String& name) const = 0; 00276 00282 virtual void beginRendering() = 0; 00283 00288 virtual void endRendering() = 0; 00289 00307 virtual void setDisplaySize(const Sizef& size) = 0; 00308 00317 virtual const Sizef& getDisplaySize() const = 0; 00318 00327 virtual const Vector2f& getDisplayDPI() const = 0; 00328 00336 virtual uint getMaxTextureSize() const = 0; 00337 00345 virtual const String& getIdentifierString() const = 0; 00346 00348 virtual ~Renderer() {} 00349 }; 00350 00351 } // End of CEGUI namespace section 00352 00353 00354 #endif // end of guard _CEGUIRenderer_h_