Exemple #1
0
 private void CreateNoiseTexture()
 {
     if (IsDestroyed)
     {
         return;
     }
     _noiseTexture = new Texture();
     _noiseTexture.Load(ContentProvider.DownloadStream("internal://textures/noise2.png").Result);
 }
Exemple #2
0
        /*
         * static Primitives()
         * {
         *      Load();
         * }
         */

        /// <summary>
        /// Loads primitive geometry.
        /// </summary>
        internal static void Load()
        {
            var primitiveStream = ContentProvider.DownloadStream("internal://content/meshes/primitives.fbx").Result;

            var primitives = FBX.Import(primitiveStream, new FBX.ImportSettings
            {
                MergeMeshes        = false,
                NormalImportMethod = FBX.NormalImportMethod.ImportNormals,
            }, "fbx", "primitives");

            CubeGeometry     = primitives.Meshes["Cube_Main"];
            ConeGeometry     = primitives.Meshes["Cone_Main"];
            WedgeGeometry    = primitives.Meshes["Wedge_Main"];
            SphereGeometry   = primitives.Meshes["Sphere_Main"];
            CylinderGeometry = primitives.Meshes["Cylinder_Main"];
            PlaneGeometry    = primitives.Meshes["Plane_Main"];

            _primitivesLoaded = true;
        }