Exemple #1
0
        public Model3D(float[] vertices, int[] faces, byte[] textureSource, int textureWidth, int textureHeight)
        {
            modelData     = new ModelData();
            modelRenderer = new ModelRenderer();

            modelData.LoadFromArrays(vertices, faces);
            modelRenderer.LoadTexture(textureSource, textureWidth, textureHeight);
            modelRenderer.LoadBuffers(modelData);
        }
Exemple #2
0
        public Model3D(string modelFile, string textureFile)
        {
            modelData     = new ModelData();
            modelRenderer = new ModelRenderer();

            modelData.LoadFromObjFile(modelFile);
            modelRenderer.LoadTexture(textureFile);
            modelRenderer.LoadBuffers(modelData);
        }