Crazy Eddie's GUI System
0.8.4
|
00001 /*********************************************************************** 00002 created: Thu Jan 8 2009 00003 author: Paul D Turner 00004 *************************************************************************/ 00005 /*************************************************************************** 00006 * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team 00007 * 00008 * Permission is hereby granted, free of charge, to any person obtaining 00009 * a copy of this software and associated documentation files (the 00010 * "Software"), to deal in the Software without restriction, including 00011 * without limitation the rights to use, copy, modify, merge, publish, 00012 * distribute, sublicense, and/or sell copies of the Software, and to 00013 * permit persons to whom the Software is furnished to do so, subject to 00014 * the following conditions: 00015 * 00016 * The above copyright notice and this permission notice shall be 00017 * included in all copies or substantial portions of the Software. 00018 * 00019 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00020 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00021 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00022 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 00023 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00024 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00025 * OTHER DEALINGS IN THE SOFTWARE. 00026 ***************************************************************************/ 00027 #ifndef _CEGUIGeometryBuffer_h_ 00028 #define _CEGUIGeometryBuffer_h_ 00029 00030 #include "CEGUI/Base.h" 00031 #include "CEGUI/Renderer.h" 00032 #include "CEGUI/Rect.h" 00033 00034 // Start of CEGUI namespace section 00035 namespace CEGUI 00036 { 00042 class CEGUIEXPORT GeometryBuffer : 00043 public AllocatedObject<GeometryBuffer> 00044 { 00045 public: 00047 virtual ~GeometryBuffer(); 00048 00053 virtual void draw() const = 0; 00054 00063 virtual void setTranslation(const Vector3f& v) = 0; 00064 00073 virtual void setRotation(const Quaternion& r) = 0; 00074 00083 virtual void setPivot(const Vector3f& p) = 0; 00084 00089 virtual void setClippingRegion(const Rectf& region) = 0; 00090 00098 virtual void appendVertex(const Vertex& vertex) = 0; 00099 00112 virtual void appendGeometry(const Vertex* const vbuff, uint vertex_count)=0; 00113 00123 virtual void setActiveTexture(Texture* texture) = 0; 00124 00130 virtual void reset() = 0; 00131 00141 virtual Texture* getActiveTexture() const = 0; 00142 00151 virtual uint getVertexCount() const = 0; 00152 00166 virtual uint getBatchCount() const = 0; 00167 00182 virtual void setRenderEffect(RenderEffect* effect) = 0; 00183 00189 virtual RenderEffect* getRenderEffect() = 0; 00190 00203 virtual void setBlendMode(const BlendMode mode); 00204 00214 virtual BlendMode getBlendMode() const; 00215 00226 virtual void setClippingActive(const bool active) = 0; 00227 00228 /* 00229 \brief 00230 Return whether clipping will be used for the current batch 00231 of vertices being defined. 00232 00233 \return 00234 - true if vertices subsequently added to the GeometryBuffer will 00235 be clipped to the clipping region defined for this GeometryBuffer. 00236 - false if vertices subsequently added will not be clippled (other than 00237 to the edges of the rendering target). 00238 */ 00239 virtual bool isClippingActive() const = 0; 00240 00241 protected: 00243 GeometryBuffer(); 00244 00246 BlendMode d_blendMode; 00247 }; 00248 00249 } // End of CEGUI namespace section 00250 00251 #endif // end of guard _CEGUIGeometryBuffer_h_