本文整理汇总了C#中UIDrawCall.Set方法的典型用法代码示例。如果您正苦于以下问题:C# UIDrawCall.Set方法的具体用法?C# UIDrawCall.Set怎么用?C# UIDrawCall.Set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIDrawCall
的用法示例。
在下文中一共展示了UIDrawCall.Set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillDrawCall
/// <summary>
/// Fill the geometry for the specified draw call.
/// </summary>
bool FillDrawCall (UIDrawCall dc)
{
if (dc != null)
{
dc.isDirty = false;
for (int i = 0; i < widgets.size; )
{
UIWidget w = widgets[i];
if (w == null)
{
#if UNITY_EDITOR
Debug.LogError("This should never happen");
#endif
widgets.RemoveAt(i);
continue;
}
if (w.drawCall == dc)
{
if (w.isVisible && w.hasVertices)
{
if (generateNormals) w.WriteToBuffers(mVerts, mUvs, mCols, mNorms, mTans);
else w.WriteToBuffers(mVerts, mUvs, mCols, null, null);
}
else w.drawCall = null;
}
++i;
}
if (mVerts.size != 0)
{
dc.Set(mVerts, generateNormals ? mNorms : null, generateNormals ? mTans : null, mUvs, mCols);
mVerts.Clear();
mNorms.Clear();
mTans.Clear();
mUvs.Clear();
mCols.Clear();
return true;
}
}
return false;
}
示例2: SubmitDrawCall
/// <summary>
/// Submit the draw call using the current geometry.
/// </summary>
void SubmitDrawCall (UIDrawCall dc)
{
drawCalls.Add(dc);
dc.Set(mVerts, generateNormals ? mNorms : null, generateNormals ? mTans : null, mUvs, mCols);
mVerts.Clear();
mNorms.Clear();
mTans.Clear();
mUvs.Clear();
mCols.Clear();
}
示例3: Fill
/// <summary>
/// Fill the geometry for the specified draw call.
/// </summary>
static bool Fill (UIDrawCall dc)
{
if (dc != null)
{
dc.isDirty = false;
for (int i = 0; i < UIWidget.list.size; )
{
UIWidget w = UIWidget.list[i];
if (w == null)
{
UIWidget.list.RemoveAt(i);
continue;
}
if (w.renderQueue == dc.renderQueue)
{
if (w.isVisible && w.hasVertices)
{
if (dc.panel.generateNormals) w.WriteToBuffers(mVerts, mUvs, mCols, mNorms, mTans);
else w.WriteToBuffers(mVerts, mUvs, mCols, null, null);
}
else
{
w.renderQueue = -1;
}
}
++i;
}
if (mVerts.size != 0)
{
dc.Set(mVerts, dc.panel.generateNormals ? mNorms : null, dc.panel.generateNormals ? mTans : null, mUvs, mCols);
mVerts.Clear();
mNorms.Clear();
mTans.Clear();
mUvs.Clear();
mCols.Clear();
return true;
}
}
return false;
}
示例4: SubmitDrawCall
/// <summary>
/// Submit the draw call using the current geometry.
/// </summary>
void SubmitDrawCall (UIDrawCall dc)
{
dc.clipping = clipping;
dc.alwaysOnScreen = alwaysOnScreen && (clipping == UIDrawCall.Clipping.None || clipping == UIDrawCall.Clipping.ConstrainButDontClip);
dc.Set(mVerts, generateNormals ? mNorms : null, generateNormals ? mTans : null, mUvs, mCols);
mVerts.Clear();
mNorms.Clear();
mTans.Clear();
mUvs.Clear();
mCols.Clear();
}
示例5: SubmitDrawCall
private void SubmitDrawCall(UIDrawCall dc)
{
dc.clipping = this.clipping;
dc.Set(mVerts, !this.generateNormals ? null : mNorms, !this.generateNormals ? null : mTans, mUvs, mCols);
mVerts.Clear();
mNorms.Clear();
mTans.Clear();
mUvs.Clear();
mCols.Clear();
}
示例6: Fill
private static bool Fill(UIDrawCall dc)
{
if (dc != null)
{
dc.isDirty = false;
int index = 0;
while (index < UIWidget.list.size)
{
UIWidget widget = UIWidget.list[index];
if (widget == null)
{
UIWidget.list.RemoveAt(index);
}
else
{
if (widget.drawCall == dc)
{
if (widget.isVisible && widget.hasVertices)
{
if (dc.manager.generateNormals)
{
widget.WriteToBuffers(mVerts, mUvs, mCols, mNorms, mTans);
}
else
{
widget.WriteToBuffers(mVerts, mUvs, mCols, null, null);
}
}
else
{
widget.drawCall = null;
}
}
index++;
}
}
if (mVerts.size != 0)
{
dc.Set(mVerts, !dc.manager.generateNormals ? null : mNorms, !dc.manager.generateNormals ? null : mTans, mUvs, mCols);
mVerts.Clear();
mNorms.Clear();
mTans.Clear();
mUvs.Clear();
mCols.Clear();
return true;
}
}
return false;
}