MyGUI_RenderItem.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_RENDER_ITEM_H_
#define MYGUI_RENDER_ITEM_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_ISubWidget.h"
#include "MyGUI_IVertexBuffer.h"
#include "MyGUI_VertexData.h"
#include "MyGUI_IRenderTarget.h"
namespace MyGUI
{
using DrawItemInfo = std::pair<ISubWidget*, size_t>;
using VectorDrawItem = std::vector<DrawItemInfo>;
class MYGUI_EXPORT RenderItem
{
public:
RenderItem();
virtual ~RenderItem();
void renderToTarget(IRenderTarget* _target, bool _update);
void setTexture(ITexture* _value);
ITexture* getTexture() const;
void setManualRender(bool _value);
bool getManualRender() const;
void addDrawItem(ISubWidget* _item, size_t _count);
void removeDrawItem(ISubWidget* _item);
void reallockDrawItem(ISubWidget* _item, size_t _count);
void outOfDate();
bool isOutOfDate() const;
size_t getNeedVertexCount() const;
size_t getVertexCount() const;
bool getCurrentUpdate() const;
Vertex* getCurrentVertexBuffer() const;
void setLastVertexCount(size_t _count);
IRenderTarget* getRenderTarget();
void setNeedCompression(bool _compression);
bool getNeedCompression() const;
private:
ITexture* mTexture{nullptr};
size_t mNeedVertexCount{0};
bool mOutOfDate{false};
VectorDrawItem mDrawItems;
// колличество отрендренных реально вершин
size_t mCountVertex{0};
bool mCurrentUpdate{true};
Vertex* mCurrentVertex{nullptr};
size_t mLastVertexCount{0};
IVertexBuffer* mVertexBuffer{nullptr};
IRenderTarget* mRenderTarget{nullptr};
bool mNeedCompression{false};
bool mManualRender{false};
};
} // namespace MyGUI
#endif // MYGUI_RENDER_ITEM_H_
MyGUI_IRenderTarget.h
MyGUI_ISubWidget.h
MyGUI_IVertexBuffer.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_VertexData.h
MyGUI::IRenderTarget
Definition MyGUI_IRenderTarget.h:21
MyGUI::ISubWidget
Definition MyGUI_ISubWidget.h:25
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::IVertexBuffer
Definition MyGUI_IVertexBuffer.h:17
MyGUI::RenderItem::addDrawItem
void addDrawItem(ISubWidget *_item, size_t _count)
Definition MyGUI_RenderItem.cpp:112
MyGUI::RenderItem::getCurrentUpdate
bool getCurrentUpdate() const
Definition MyGUI_RenderItem.cpp:207
MyGUI::RenderItem::setManualRender
void setManualRender(bool _value)
Definition MyGUI_RenderItem.cpp:177
MyGUI::RenderItem::setTexture
void setTexture(ITexture *_value)
Definition MyGUI_RenderItem.cpp:151
MyGUI::RenderItem::getRenderTarget
IRenderTarget * getRenderTarget()
Definition MyGUI_RenderItem.cpp:222
MyGUI::RenderItem::renderToTarget
void renderToTarget(IRenderTarget *_target, bool _update)
Definition MyGUI_RenderItem.cpp:29
MyGUI::RenderItem::RenderItem
RenderItem()
Definition MyGUI_RenderItem.cpp:18
MyGUI::RenderItem::getManualRender
bool getManualRender() const
Definition MyGUI_RenderItem.cpp:182
MyGUI::RenderItem::getVertexCount
size_t getVertexCount() const
Definition MyGUI_RenderItem.cpp:202
MyGUI::RenderItem::getNeedCompression
bool getNeedCompression() const
Definition MyGUI_RenderItem.cpp:172
MyGUI::RenderItem::isOutOfDate
bool isOutOfDate() const
Definition MyGUI_RenderItem.cpp:192
MyGUI::RenderItem::outOfDate
void outOfDate()
Definition MyGUI_RenderItem.cpp:187
MyGUI::RenderItem::setNeedCompression
void setNeedCompression(bool _compression)
Definition MyGUI_RenderItem.cpp:167
MyGUI::RenderItem::reallockDrawItem
void reallockDrawItem(ISubWidget *_item, size_t _count)
Definition MyGUI_RenderItem.cpp:129
MyGUI::RenderItem::getNeedVertexCount
size_t getNeedVertexCount() const
Definition MyGUI_RenderItem.cpp:197
MyGUI::RenderItem::removeDrawItem
void removeDrawItem(ISubWidget *_item)
Definition MyGUI_RenderItem.cpp:87
MyGUI::RenderItem::getCurrentVertexBuffer
Vertex * getCurrentVertexBuffer() const
Definition MyGUI_RenderItem.cpp:212
MyGUI::RenderItem::getTexture
ITexture * getTexture() const
Definition MyGUI_RenderItem.cpp:162
MyGUI::RenderItem::setLastVertexCount
void setLastVertexCount(size_t _count)
Definition MyGUI_RenderItem.cpp:217
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorDrawItem
std::vector< DrawItemInfo > VectorDrawItem
Definition MyGUI_RenderItem.h:20
MyGUI::DrawItemInfo
std::pair< ISubWidget *, size_t > DrawItemInfo
Definition MyGUI_RenderItem.h:19
MyGUI::Vertex
Definition MyGUI_VertexData.h:17