Axiom3D学习日记 1.程序配置
生活随笔
收集整理的這篇文章主要介紹了
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(); }?
轉載于:https://www.cnblogs.com/niconico/p/5007317.html
總結
以上是生活随笔為你收集整理的Axiom3D学习日记 1.程序配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 聊斋志异读后感 [20180818]
- 下一篇: 获取下拉框select上次选择的值