Exemple #1
0
        static Vbo LoadGeom(string file)
        {
            MeshData m = new ObjLoader().LoadFile(file);

            float[] verts; float[] norms; float[] texcoords; uint[] indices;
            m.OpenGLArrays(out verts, out norms, out texcoords, out indices);

            bool v = false;

            for (int i = 0; i < texcoords.Length; i++)
            {
                if (v)
                {
                    texcoords[i] = 1 - texcoords[i];
                    v            = false;
                }
                else
                {
                    v = true;
                }
            }
            return(new Vbo(verts, norms, texcoords, indices));
        }