Example #1
0
 static SSTexturedCube()
 {
     int verticesPerQuad = c_vertices.Length;
     SSVertex_PosTex[] vertices = new SSVertex_PosTex[verticesPerQuad * 6];
     for (int f = 0; f < 6; ++f) {
         for (int v = 0; v < verticesPerQuad; ++v) {
             SSVertex_PosTex vertex = c_vertices [v];
             vertex.Position = Vector3.Transform(vertex.Position, c_faceTransforms [f]);
             vertices [f * verticesPerQuad + v] = vertex;
         }
     }
     Instance = new SSVertexBuffer<SSVertex_PosTex> (vertices);
 }
Example #2
0
        static SSTexturedCube()
        {
            int verticesPerQuad = c_vertices.Length;

            SSVertex_PosTex[] vertices = new SSVertex_PosTex[verticesPerQuad * 6];
            for (int f = 0; f < 6; ++f)
            {
                for (int v = 0; v < verticesPerQuad; ++v)
                {
                    SSVertex_PosTex vertex = c_vertices [v];
                    vertex.Position = Vector3.Transform(vertex.Position, c_faceTransforms [f]);
                    vertices [f * verticesPerQuad + v] = vertex;
                }
            }
            Instance = new SSVertexBuffer <SSVertex_PosTex> (vertices);
        }