标签:
程序基本步骤:
资源包括 textures, models, scripts, 等等. . Thus far we have been using EngineConfig.xml to define Resource paths.
通过 ResourceGroupManager class 来新增资源路径:
1.
ResourceGroupManager.Instance.AddResourceLocation(location, type, group);
第一个参数是 文件夹名字.
第二参数是资源类型: "Folder" (文件夹) or "Zip" (压缩包).
第三参数,资源组.
1.
ResourceGroupManager.Instance.AddResourceLocation(
"Media"
,
"Folder"
,
"General"
);
1.
root.RenderSystem = root.RenderSystems[
"DirectX9"
];
选项有 DirectX9, OpenGL, and Xna.
1.
Root.Instance.RenderSystem.ConfigOptions[
"Video Mode"
].Value =
"1280 x 720 @ 32-bit color"
;
这里有些共有设定:
Name |
Purpose |
Video Mode |
Sets resolution and color-depth.颜色深度 |
Full Screen |
Sets whether to use the full screen.是否全屏 |
VSync |
Syncs FPS to monitors refresh rate,垂直同步 |
Anti-Aliasing |
Gives the appearence of smoother edges.抗锯齿 |
Floating-Point mode |
浮点模式,平滑或则快速 |
创建一个渲染窗口.
1.
RenderWindow window = root.Initialize(
true
,
"Window Title"
);
第一个参数:是否创建窗口.如果true,就会创建.
1.
RenderWindow window = root.CreateRenderWindow(
"Axiom Render Window"
, 800, 600,
false
);
Axiom.Collections.NamedParameterList paramList =
new
Axiom.Collections.NamedParameterList();
paramList[
"externalWindowHandle"
] = pictureBox1.Handle;
Axiom.Graphics.RenderWindow window = _Root.CreateRenderWindow(
"RenderWindow"
, pictureBox1.Width, pictureBox1.Height,
false
, paramList);
标签:
原文地址:http://www.cnblogs.com/niconico/p/5007720.html