当前位置: 首页>>代码示例>>C#>>正文


C# UIDrawCall.Set方法代码示例

本文整理汇总了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;
	}
开发者ID:githubsdk,项目名称:nlearn,代码行数:48,代码来源:UIPanel.cs

示例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();
	}
开发者ID:githubsdk,项目名称:nlearn,代码行数:14,代码来源:UIPanel.cs

示例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;
	}
开发者ID:trustmeimajedi,项目名称:Unity-SDK,代码行数:48,代码来源:UIPanel.cs

示例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();
	}
开发者ID:hoangwin,项目名称:2-ca-rs-tim-berman,代码行数:15,代码来源:UIPanel.cs

示例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();
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:10,代码来源:UIPanel.cs

示例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;
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:49,代码来源:UIPanel.cs


注:本文中的UIDrawCall.Set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。