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();
    }
  • 相关阅读:
    指令级并行:动态调度技术
    单纯形法的矩阵描述
    QTextEdit回车事件重写
    整数规划
    全退
    流水线分析例题
    操作系统期中复习思考题
    流水线技术概述
    中心极限定理
    大数定律
  • 原文地址:https://www.cnblogs.com/niconico/p/5007317.html
Copyright © 2011-2022 走看看