CEGUI build

CEGUI build     Everygamesneed2dguisystemforplayerinterface,asweknownasOGRE3drenderenginepronouncethatitwilluseCEGUIcomponentforits2dpart,becauseCEGUIisveryprofessionalandpo

大家好,又见面了,我是你们的朋友全栈君。

        Every games need 2d gui system for player interface, as we known as OGRE 3d render engine pronounce that it will use CEGUI component for its 2d part, because CEGUI is very professional and powerful, so I want to see its miracle source code,I’d like to share some experience for newcomer.

Firstly, I download CEGUI 5.0 and dependencies 5.0 – vs8 and build successfully, here are necessary resource:

1. Src: http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.5.0b.zip?download
2. Dependecies for vs 2005: http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-DEPS-0.5.0b-vc8.zip?download
3. CEGUI Wiki: http://www.cegui.org.uk/wiki/index.php/Main_Page
4. All: http://sourceforge.net/projects/crayzedsgui/files/

Note: if you use visual studio 2005, must make sure it has sp1 package, will has 0XC0150002 error or not.
vs2005 sp1: http://download.microsoft.com/download/8/0/7/8071514d-9370-45c3-8af1-4ff09a70e59d/VS80sp1-KB926604-X86-CHS.exe

Now let us have a look at these source code file structure, as following,

./bin           all CEGUI base dll which will be compiled by me letter.
./datafiles        all demo resource
./dependencies      all depend on other library
./ImageCodecModules    some image codec source code
./include         all CEGUI head file
./makefiles/premake    cegui and examples’ project, and project configure[Important: config.lua]
./RendererModules     some render modules such as dx9, dx8, irrlich, opengl
./ScriptingModules    cegui lua module
./src           all CEGUI source code
./WindowRendererSets   all real render implement of cegui control like button, edit. latter I will explain in detail.
./XMLParserModules    some xml parser such TinyXML, Xerces etc. because cegui serialize all object to xml file format.
./XMLRefSchema      some schema for loading.

Here we go, secondly I will build a example for demo, check file directory in [./makefiles/premake]. Hold on please, there is a very important thing to do before you execute batch file. You should use which render module for rendering. for example, I want to use directx 9.0 for rendering, in this case please open config.lua using notepad, you will find,

————-
— Renderers
— this controls which renderer modules are built
OPENGL_RENDERER = true   ——-> false
DIRECTX81_RENDERER = false
DIRECTX9_RENDERER = false ——-> true
IRRLICHT_RENDERER = false

I think you understand what to do, just change opengl to false, turn on directx9. Let’s execute 2005 bat file, will produce two solutions, one is CEGUI.sln, building is OK! Here Focus on CEGUISamples.sln. Error will be see when run demo_xxx.exe because of loading resource. latter I will just give some to do and no reason, and you will understand when debuging source code. open CEGuiD3D9BaseApplication.cpp and modify it’s constructor,

// initialise the re quired dirs for the DefaultResourceProvider
CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*> (CEGUI::System::getSingleton().getResourceProvider());
const char* dataPathPrefix = getDataPathPrefix();
char resourcePath[PATH_MAX];

sprintf_s(resourcePath, PATH_MAX, “%s%s”, dataPathPrefix, “datafiles/schemes/”);
rp->setResourceGroupDirectory(“schemes”, resourcePath);
sprintf_s(resourcePath, PATH_MAX, “%s%s”, dataPathPrefix, “datafiles/imagesets/”);
rp->setResourceGroupDirectory(“imagesets”, resourcePath);
sprintf_s(resourcePath, PATH_MAX, “%s%s”, dataPathPrefix, “datafiles/fonts/”);
rp->setResourceGroupDirectory(“fonts”, resourcePath);
sprintf_s(resourcePath, PATH_MAX, “%s%s”, dataPathPrefix, “datafiles/layouts/”);
rp->setResourceGroupDirectory(“layouts”, resourcePath);
sprintf_s(resourcePath, PATH_MAX, “%s%s”, dataPathPrefix, “datafiles/looknfeel/”);
rp->setResourceGroupDirectory(“looknfeels”, resourcePath);
sprintf_s(resourcePath, PATH_MAX, “%s%s”, dataPathPrefix, “datafiles/lua_scripts/”);
rp->setResourceGroupDirectory(“lua_scripts”, resourcePath);

at last add a member function for this class,

const char* CEGuiD3D9BaseApplication::getDataPathPrefix() const
{

// TO ADD:
// return your datafiles full path here
}

the end, good luck to you!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163749.html原文链接:https://javaforall.net

(0)
上一篇 2022年7月23日 下午10:46
下一篇 2022年7月23日 下午10:46


相关推荐

  • R 多元方差分析

    R 多元方差分析当因变量 结果变量 不止一个时 可用多元方差分析 MANOVA 对它们同时进行分析 以 MASS 包中的 UScereal 数据集为例 Venables Ripley 1999 我们将研究美国谷物中的卡路里 脂肪和糖含量是否会因为储存架位置的不同而发生变化 其中 1 代表底层货架 2 代表中层货架 3 代表顶层货架 卡路里 脂肪和糖含量是因变量 货架是三水平 1 2 3 的自变量 gt library MASS gt attach UScereal gt shelf lt factor

    2026年3月18日
    3
  • linux centos 权限审核 polkitd进程 简介[通俗易懂]

    linux centos 权限审核 polkitd进程 简介[通俗易懂]polkit是一个应用程序级别的工具集,通过定义和审核权限规则,实现不同优先级进程间的通讯:控制决策集中在统一的框架之中,决定低优先级进程是否有权访问高优先级进程。Polkit在系统层级进行权限控制,提供了一个低优先级进程和高优先级进程进行通讯的系统。和sudo等程序不同,Polkit并没有赋予进程完全的root权限,而是通过一个集中的策略系统进行更精细的授权。Polkit定义出一系列操作,例如运行GParted,并将用户按照群组或用户名进行划分,例如wheel群组用户。了.

    2022年6月15日
    99
  • ubuntu16.04 安装 Eric6「建议收藏」

    从安装qt,到安装qtpy,到安装Eric6,这是一个很痛苦的过程。总是会有一大段的错误,然后在网上各种搜索,然后去改,然后还是有新的错误,又去找答案,一直重复,我都快崩溃了。最后,终于,找到这一篇博客:http://blog.csdn.net/suxiang198/article/details/52042526。这篇博客解决了大部分坑,不过到后面部分还是出现了问题,安装不上去。最后,终于在E

    2022年4月8日
    51
  • vuex mapGetters「建议收藏」

    vuex mapGetters「建议收藏」1、vuex配置//vuex的配置//注意Store是大写conststore=newVuex.Store({//数据保存state:{show:false,count:…

    2022年6月8日
    30
  • PLSQL Developer 9 绿色版

    PLSQL Developer 9 绿色版

    2021年8月13日
    78
  • 黑客[入门]

    黑客[入门]第1章黑客基础知识随着互联网技术的飞速发展,网络世界的安全性不断受到挑战。如果你要上网,就免不了遇到黑客的侵扰。本章就为大家介留一些最基本的黑客入门知识,揭密黑客常用的一些命令,当然这些微不足道的伎俩难以入侵戒备森严的网络,不过至少让初学者对黑客的“工作情形”有初步的认识。本章导读1.1黑客简单介绍最早的计算机于1946年在宾夕法尼亚大学出现,而最早的黑客出现于麻省理工学院(贝尔实验室也有)。最初的黑客一般都是一些高级的技术人员,他们热衷于挑战、崇尚自由并主张信息的共享。1…

    2022年5月8日
    67

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号