本文整理汇总了C#中Texture.write方法的典型用法代码示例。如果您正苦于以下问题:C# Texture.write方法的具体用法?C# Texture.write怎么用?C# Texture.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Texture
的用法示例。
在下文中一共展示了Texture.write方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createEdgeTexture
//private void draw();
private void createEdgeTexture()
{
#if PENDING
lineEdgeTexture = new Texture(2, 1, FMT_A8R8G8B8, 0);
uint[] dest = new uint[2];
dest[0] = 0x00000000;
dest[1] = 0xffffffff;
lineEdgeTexture.write(0, 0, 0, 2, 1, dest, 0, FMT_A8R8G8B8);
#endif
}
示例2: createDashTexture
private void createDashTexture()
{
if (context.lineDashLengths.Count == 0)
{
dashLength = 1;
return;
}
#if PENDING
lineDashTexture = new Texture(2048, 1, FMT_A8R8G8B8, 0, 0);
#endif
uint[] dest = new uint[2048];
int i, j = 0, k;
float phase = 0;
bool state = true;
float l = 0;
for (i = 0; i < context.lineDashLengths.Count; i++)
l += context.lineDashLengths[i];
dashLength = l;
for (i = 0; i < context.lineDashLengths.Count; i++)
{
phase += context.lineDashLengths[i];
k = (int)(phase / l * 2048);
while (j < k)
dest[j++] = state ? 0xffffffff : 0x0;
state = !state;
}
while (j < 2048)
dest[j++] = 0xffffffff;
#if PENDING
lineDashTexture.write(0, 0, 0, 2048, 1, dest, 0, FMT_A8R8G8B8);
#endif
}