MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_RenderItem.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_RENDER_ITEM_H__
23 #define __MYGUI_RENDER_ITEM_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_ISubWidget.h"
27 #include "MyGUI_IVertexBuffer.h"
28 #include "MyGUI_VertexData.h"
29 #include "MyGUI_IRenderTarget.h"
30
31 namespace MyGUI
32 {
33
34 typedef std::pair<ISubWidget*, size_t> DrawItemInfo;
35 typedef std::vector<DrawItemInfo> VectorDrawItem;
36
37 class MYGUI_EXPORT RenderItem
38 {
39 public:
40 RenderItem();
41 virtual ~RenderItem();
42
43 void renderToTarget(IRenderTarget* _target, bool _update);
44
45 void setTexture(ITexture* _value);
46 ITexture* getTexture();
47
48 void setManualRender(bool _value);
49 bool getManualRender() const;
50
51 void addDrawItem(ISubWidget* _item, size_t _count);
52 void removeDrawItem(ISubWidget* _item);
53 void reallockDrawItem(ISubWidget* _item, size_t _count);
54
55 void outOfDate();
56 bool isOutOfDate() const;
57
58 size_t getNeedVertexCount() const;
59 size_t getVertexCount() const;
60
61 bool getCurrentUpdate() const;
62 Vertex* getCurrentVertexBuffer() const;
63
64 void setLastVertexCount(size_t _count);
65
66 IRenderTarget* getRenderTarget();
67
68 bool getCompression();
69
70 private:
71 #if MYGUI_DEBUG_MODE == 1
72 std::string mTextureName;
73 #endif
74
75 ITexture* mTexture;
76
77 size_t mNeedVertexCount;
78
79 bool mOutOfDate;
80 VectorDrawItem mDrawItems;
81
82 // колличество отрендренных реально вершин
83 size_t mCountVertex;
84
85 bool mCurrentUpdate;
86 Vertex* mCurrentVertex;
87 size_t mLastVertexCount;
88
89 IVertexBuffer* mVertexBuffer;
90 IRenderTarget* mRenderTarget;
91
92 bool mCompression;
93 bool mManualRender;
94 };
95
96 } // namespace MyGUI
97
98 #endif // __MYGUI_RENDER_ITEM_H__
MyGUI_VertexData.h
MyGUI_IVertexBuffer.h
MyGUI_Prerequest.h
MyGUI_IRenderTarget.h
MyGUI::DrawItemInfo
std::pair< ISubWidget *, size_t > DrawItemInfo
Definition: MyGUI_RenderItem.h:34
MyGUI::RenderItem
Definition: MyGUI_RenderItem.h:37
MyGUI::IVertexBuffer
Definition: MyGUI_IVertexBuffer.h:31
MyGUI::ISubWidget
Definition: MyGUI_ISubWidget.h:39
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ITexture
Definition: MyGUI_ITexture.h:41
MyGUI::IRenderTarget
Definition: MyGUI_IRenderTarget.h:35
MyGUI::VectorDrawItem
std::vector< DrawItemInfo > VectorDrawItem
Definition: MyGUI_RenderItem.h:35
MyGUI_ISubWidget.h
MyGUI::Vertex
Definition: MyGUI_VertexData.h:31