本文整理汇总了C#中System.Single.concat方法的典型用法代码示例。如果您正苦于以下问题:C# Single.concat方法的具体用法?C# Single.concat怎么用?C# Single.concat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Single
的用法示例。
在下文中一共展示了Single.concat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: initBuffers
void initBuffers()
{
triangleVertexPositionBuffer = gl.createBuffer();
gl.bindBuffer(GL.ARRAY_BUFFER, triangleVertexPositionBuffer);
var vertices = new GLfloat[] {
0.0f, 1.0f, 0.0f,
-1.0f, -1.0f, 0.0f,
1.0f, -1.0f, 0.0f
};
gl.bufferData(GL.ARRAY_BUFFER, new Float32Array(vertices), GL.STATIC_DRAW);
triangleVertexPositionBuffer_itemSize = 3;
triangleVertexPositionBuffer_numItems = 3;
triangleVertexColorBuffer = gl.createBuffer();
gl.bindBuffer(GL.ARRAY_BUFFER, triangleVertexColorBuffer);
var colors = new GLfloat[] {
1.0f, 0.0f, 0.0f, 1.0f,
0.0f, 1.0f, 0.0f, 1.0f,
0.0f, 0.0f, 1.0f, 1.0f
};
gl.bufferData(GL.ARRAY_BUFFER, new Float32Array(colors), GL.STATIC_DRAW);
triangleVertexColorBuffer_itemSize = 4;
triangleVertexColorBuffer_numItems = 3;
squareVertexPositionBuffer = gl.createBuffer();
gl.bindBuffer(GL.ARRAY_BUFFER, squareVertexPositionBuffer);
vertices = new GLfloat[] {
1.0f, 1.0f, 0.0f,
-1.0f, 1.0f, 0.0f,
1.0f, -1.0f, 0.0f,
-1.0f, -1.0f, 0.0f
};
gl.bufferData(GL.ARRAY_BUFFER, new Float32Array(vertices), GL.STATIC_DRAW);
squareVertexPositionBuffer_itemSize = 3;
squareVertexPositionBuffer_numItems = 4;
squareVertexColorBuffer = gl.createBuffer();
gl.bindBuffer(GL.ARRAY_BUFFER, squareVertexColorBuffer);
colors = new GLfloat[] {};
for (var i=0; i < 4; i++) {
colors = colors.concat(new GLfloat[] { 0.5f, 0.5f, 1.0f, 1.0f });
}
gl.bufferData(GL.ARRAY_BUFFER, new Float32Array(colors), GL.STATIC_DRAW);
squareVertexColorBuffer_itemSize = 4;
squareVertexColorBuffer_numItems = 4;
}