Пример #1
0
        public void Draw()
        {
            if (polygonType != LoadableModel.currentPolygon)
            {
                Gl.glEnd();
                LoadableModel.Init(polygonType);
                LoadableModel.currentPolygon = polygonType;
            }

            for (int i = 0; i < vertices.Length; i++)
            {
                if (normalVertices.Length > 0)
                {
                    Gl.glNormal3f(normalVertices[i].x, normalVertices[i].y, normalVertices[i].z);
                }
                if (textureVertices.Length > 0)
                {
                    Gl.glTexCoord2f(textureVertices[i].x, textureVertices[i].y);
                }
                if (vertices.Length > 0)
                {
                    Gl.glVertex3f(vertices[i].x, vertices[i].y, vertices[i].z);
                }
            }
        }
Пример #2
0
 public void Init()
 {
     LoadableModel.Init(faces[0].PolygonType());
 }