zoukankan      html  css  js  c++  java
  • Axiom3D学习日记 1.程序配置

    1.需要引用的库

    • Axiom
    • Axiom.Framework
    • Axiom.Platforms.Win32
    • Axiom.Plugins.FreeImageCodecs
    • Axiom.Plugins.ParticleFX
    • Axiom.RenderSystems.Xna OR Axiom.RenderSystems.OpenGL.OpenTK OR Axiom.RenderSystems.DirectX9

    还要复制使用的底层DLL到程序目录.freeimage.dll zlib1.dll

    2.如果使用的是VS2010和.net4.0,需要在App.config文件里的<configuration />节点内写入配置信息..

    <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>

    3.引用这些命名空间

    using Axiom.Core;
    using Axiom.Graphics;
    using Axiom.Math;
    using Axiom.Framework.Configuration;

    4.复制这些代码,运行.

    IConfigurationManager ConfigurationManager = ConfigurationManagerFactory.CreateDefault();
    using ( var root = new Root( "Game1.log" ) )
    {
        if ( ConfigurationManager.ShowConfigDialog( root ) )
        {
            RenderWindow window = root.Initialize( true );
    
            ResourceGroupManager.Instance.AddResourceLocation( "media", "Folder", true );
    
            SceneManager scene = root.CreateSceneManager( SceneType.Generic );
            Camera camera = scene.CreateCamera( "cam1" );
            Viewport viewport = window.AddViewport( camera );
    
            TextureManager.Instance.DefaultMipmapCount = 5;
            ResourceGroupManager.Instance.InitializeAllResourceGroups();
    
            Entity penguin = scene.CreateEntity( "bob", "penguin.mesh" );
            SceneNode penguinNode = scene.RootSceneNode.CreateChildSceneNode();
            penguinNode.AttachObject( penguin );
    
            camera.Move( new Vector3( 0, 0, 300 ) );
            camera.LookAt( penguin.BoundingBox.Center );
            root.RenderOneFrame();
        }
        Console.Write( "Press [Enter] to exit." );
        Console.ReadLine();
    }
  • 相关阅读:
    机器学习算法的流程总结
    机器学习算法的流程总结
    路由器的原理
    路由器的原理
    机器学习编程接口(api)设计(oop 设计)
    机器学习编程接口(api)设计(oop 设计)
    组态档(configuration file)与建构档
    组态档(configuration file)与建构档
    学习之法 —— 套路
    学习之法 —— 套路
  • 原文地址:https://www.cnblogs.com/niconico/p/5007317.html
Copyright © 2011-2022 走看看