38 mVertexBuffer =
nullptr;
43 if (mTexture ==
nullptr)
46 mRenderTarget = _target;
48 mCurrentUpdate = _update;
50 if (mOutOfDate || _update)
54 if (buffer !=
nullptr)
56 for (VectorDrawItem::iterator iter = mDrawItems.begin(); iter != mDrawItems.end(); ++iter)
59 mCurrentVertex = buffer;
62 (*iter).first->doRender();
66 buffer += mLastVertexCount;
67 mCountVertex += mLastVertexCount;
77 if (0 != mCountVertex)
79 #if MYGUI_DEBUG_MODE == 1
83 MYGUI_EXCEPT(
"texture pointer is not valid, texture name '" << mTextureName <<
"'");
90 for (VectorDrawItem::iterator iter = mDrawItems.begin(); iter != mDrawItems.end(); ++iter)
91 (*iter).first->doManualRender(mVertexBuffer, mTexture, mCountVertex);
95 _target->
doRender(mVertexBuffer, mTexture, mCountVertex);
102 for (VectorDrawItem::iterator iter = mDrawItems.begin(); iter != mDrawItems.end(); ++iter)
104 if ((*iter).first == _item)
106 mNeedVertexCount -= (*iter).second;
107 mDrawItems.erase(iter);
113 if (mDrawItems.empty())
129 #if MYGUI_DEBUG_MODE == 1
130 for (VectorDrawItem::iterator iter = mDrawItems.begin(); iter != mDrawItems.end(); ++iter)
137 mNeedVertexCount += _count;
145 for (VectorDrawItem::iterator iter = mDrawItems.begin(); iter != mDrawItems.end(); ++iter)
147 if ((*iter).first == _item)
150 if ((*iter).second < _count)
152 mNeedVertexCount -= (*iter).second;
153 mNeedVertexCount += _count;
154 (*iter).second = _count;
167 if (mTexture == _value)
175 #if MYGUI_DEBUG_MODE == 1
176 mTextureName = mTexture ==
nullptr ?
"" : mTexture->
getName();
187 bool result = mCompression;
188 mCompression =
false;
194 mManualRender = _value;
199 return mManualRender;
214 return mNeedVertexCount;
224 return mCurrentUpdate;
229 return mCurrentVertex;
234 mLastVertexCount = _count;
239 return mRenderTarget;