Can not locate the layout file of cegui in basic ogre tutorial 6

Source: Internet
Author: User

The tutorial targets previous versions of ogre and cegui. Therefore, the. XML format suffix is still used. layout is used for cegui7.1, and the path of the layout file needs to be set under the [general] configuration section When configuring resource. cfg. To solve this problem, you need to take a closer look at how the ResourceManager module handles these configurations. I will provide a detailed description.

Connection problems:

After viewing the cegui and ogreSource codeIn cegui7.1, mguirenderer = & cegui: ogrerenderer: bootstrapsystem ();

SimilarCodeIn ogrerenderer: bootstrapsystem ();

The specific initialization code in is as follows:

Ogrerenderer & Renderer = ogrerenderer: Create (target );
Ogreresourceprovider & Rp = createogreresourceprovider ();
Ogreimagecodec & Ic = createogreimagecodec ();

Among them, ogreresourceprovider has the default resourceprovider in cegui. In ogre, we call bootstrapsystem, which naturally uses ogreresourceprovider. The search for natural resources follows the Ogre configuration rules.

If you try again, you will find that in the windowmanager: loadwindowlayout method

System: getsingleton (). getxmlparser ()-> parsexmlfile (handler, filename, guilayoutschemaname, resourcegroup. Empty ()? D_defaultresourcegroup: resourcegroup); in this line, we find the parsexmlfile method in the class

Expatparser: Public xmlparser, and in expatparser: parsexmlfile, the secret is quickly found: cegui: System: getsingleton (). getresourceprovider ()-> loadrawdatacontainer (filename, rawxmldata, resourcegroup); the problem is that the call relationship is as follows:

Cegui-> initialization (including ogreresourceprovider)-> loadwindowlayout-> parsexmlfile-> getresourceprovider ()-> loadrawdatacontainer

The error is reported in the ResourceManager module of ogre.

 

As to why we must be in general, I think we didn't provide the name of the Resource Group when loadwindowlayout, so we used the default general group.

 

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.