/// <summary> /// BlockMesh をロードします。 /// </summary> void LoadBlockMesh() { var blockLoader = new StringBlockLoader(blockData); var meshFactory = new BlockMeshFactory(GraphicsDevice); meshManager = new BlockMeshManager(blockLoader, meshFactory); // 通常の IBlockEffect をロードします。 blockEffect = new BasicBlockEffect(GraphicsDevice); blockEffect.EnableDefaultLighting(); // インスタンシング用の IBlockEffect をロードします。 var instancingEffect = Content.Load <Effect>("Effects/Instancing"); instancingBlockEffect = new InstancingBlockEffect(instancingEffect); instancingBlockEffect.EnableDefaultLighting(); // 実際のアプリケーションではファイルの Block から BlockMesh をロードします。 // BlockMesh をロードします。 mesh = meshManager.Load("Dummy", lodCount); }
/// <summary> /// BlockMesh をロードします。 /// </summary> void LoadBlockMesh() { var blockLoader = new StringBlockLoader(blockData); var meshFactory = new BlockMeshFactory(GraphicsDevice); meshManager = new BlockMeshManager(blockLoader, meshFactory); // 通常の IBlockEffect をロードします。 blockEffect = new BasicBlockEffect(GraphicsDevice); blockEffect.EnableDefaultLighting(); // インスタンシング用の IBlockEffect をロードします。 var instancingEffect = Content.Load<Effect>("Effects/Instancing"); instancingBlockEffect = new InstancingBlockEffect(instancingEffect); instancingBlockEffect.EnableDefaultLighting(); // 実際のアプリケーションではファイルの Block から BlockMesh をロードします。 // BlockMesh をロードします。 mesh = meshManager.Load("Dummy", lodCount); }