Axiom3d Learning Diary 0.Axiom Basics

Source: Internet
Author: User

Procedure Basic steps:

    1. Create the Root object.
    2. Define the resources that the application would use.
    3. Choose and set up the render system (which is, DirectX, OpenGL, etc).
    4. Create the Render window (the window which Axiom'll render onto).
    5. Initialize the resources that is going to use.
    6. Create a scene using those resources.
    7. Set up any third party libraries and plugins.
    8. Create frame listeners.
    9. Start the render loop.
Defining Resources

Resources include textures, models, scripts, and so on. . Thus far we had been using Engineconfig.xml to define Resource paths.
To add a resource path by Resourcegroupmanager class:

1. ResourceGroupManager.Instance.AddResourceLocation(location, type, group);

The first parameter is the name of the folder.

The second parameter is the resource type: "folder" or "Zip" (compressed package).

The third parameter, the resource group.

1. ResourceGroupManager.Instance.AddResourceLocation( "Media" , "Folder" , "General" );Selecting a rendering system 1. root.RenderSystem = root.RenderSystems[ "DirectX9" ];

The options are DirectX9, OpenGL, and Xna.

1. Root.Instance.RenderSystem.ConfigOptions[ "Video Mode" ].Value = "1280 x 720 @ 32-bit color" ;

Here are some common settings:

Name
Purpose
Video Mode
Sets resolution and color-depth. Color depth
Full Screen
Sets whether to use the full screen.
VSync
Syncs FPS to monitors refresh rate, vertical sync
Anti-aliasing
Gives the appearence of smoother edges. Anti-aliasing
Floating-point mode
Floating point mode, smooth or fast

Creates a render window.

1. RenderWindow window = root.Initialize( true , "Window Title" );

First parameter: Whether to create a window. If true, it is created.

1. RenderWindow window = root.CreateRenderWindow( "Axiom Render Window" , 800, 600, false );instead of creating a window, use the WinForm window to use the following code. 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);

Axiom3d Learning Diary 0.Axiom Basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.