Inheritance: IVoxelMesh
Beispiel #1
0
        /// <summary>
        /// Initializes application.
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();

            TexturePack pack = new TexturePack();

            pack.Color = LoadTexture(@"Textures\tex_detail_color.dds");
            pack.Bump  = LoadTexture(@"Textures\tex_detail_bump.dds");
            textures.Add(pack);

            for (int i = 1; i <= 19; i++)
            {
                pack       = new TexturePack();
                pack.Color = LoadTexture(@"Textures\tex_" + i + @"_color.dds");
                pack.Bump  = LoadTexture(@"Textures\tex_" + i + @"_bump.dds");
                pack.Disp  = LoadTexture(@"Textures\tex_" + i + @"_disp.dds");
                textures.Add(pack);
            }

            voxelTerrain = new VoxelMesh(graphicsDevice, camera);

            VoxelMeshSettings settings = voxelTerrain.Container.Settings;

            settings.DetailTexture          = textures[0];
            settings.Texture1               = textures[1];
            settings.Texture2               = textures[2];
            settings.Texture3               = textures[3];
            voxelTerrain.Container.Settings = settings;

            skyCube = new SkyCube(graphicsDevice, camera);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes application.
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();

            TexturePack pack = new TexturePack();
            pack.Color = LoadTexture(@"Textures\tex_detail_color.dds");
            pack.Bump = LoadTexture(@"Textures\tex_detail_bump.dds");
            textures.Add(pack);

            for (int i = 1; i <= 19; i++)
            {
                pack = new TexturePack();
                pack.Color = LoadTexture(@"Textures\tex_" + i + @"_color.dds");
                pack.Bump = LoadTexture(@"Textures\tex_" + i + @"_bump.dds");
                pack.Disp = LoadTexture(@"Textures\tex_" + i + @"_disp.dds");
                textures.Add(pack);
            }

            voxelTerrain = new VoxelMesh(graphicsDevice, camera);

            VoxelMeshSettings settings = voxelTerrain.Container.Settings;
            settings.DetailTexture = textures[0];
            settings.Texture1 = textures[1];
            settings.Texture2 = textures[2];
            settings.Texture3 = textures[3];
            voxelTerrain.Container.Settings = settings;

            skyCube = new SkyCube(graphicsDevice, camera);
        }