Use ogre rtt in cegui 0.8
2015-01-01 08:49
399 查看
Ogre rtt in cegui 0.8
It's easy to display ogre rtt in cegui, but something should be taking care of.1. set up ogre texture
mpOgreTexture = &static_cast<CEGUI::OgreTexture&>(getOgreRenderer()->createTexture("OgreTexture"));
mpOgreTexture->setOgreTexture(ogreRtt);
2. set up cegui image, don't forget the image area.
mpImage = static_cast<CEGUI::BasicImage*>(&CEGUI::ImageManager::getSingleton().create("BasicImage",imageName));
mpImage ->setTexture(mpOgreTexture);
CEGUI::Rectf imageArea(0.0f, 0.0f, yourRttWidth, yourRttHeight);
mpImage->setArea(imageArea);
mpImage->setAutoScaled(CEGUI::ASM_Disabled);
3. set image property of your cegui window at last.
mpimgTex->setProperty("Image", imageName);
Be careful
If your cegui window resides in FrameWindow, you must turn AutoRenderingSurface to false,otherwise cegui will use imagery cash to display rtt.
If you change rtt to another one at realtime, you need to call,
mpimgTex->invalidate();
this tell cegui to change texture, otherwise it will sill use display previous rtt.
相关文章推荐
- 从OGRE纹理到CEGUI纹理 —— 使用RTT实现3D角色预览
- 从OGRE纹理到CEGUI纹理 —— 使用RTT实现3D角色预览
- 从OGRE纹理到CEGUI纹理 —— 使用RTT实现
- Use MusicBrainz in iOS(二)通过歌曲名查询信息
- 启动maven项目时Address already in use: JVM_Bind<null>:8080错误的解决办法
- Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to add
- android下syslogd启动后出现“syslogd: bind: Address already in use”错误的解决方法
- nginx启动服务提示98: Address already in use错误的解决
- errno.h中定义的常量undeclared (first use in this function)
- VMware Workstation 出现 "This virtual machine appears to be in use
- OGRE+CEGUI+OIS鼠标无法移出窗口解决方案
- java.net.BindException: Address already in use: connect
- The requested resource is in use解决办法
- 网站开发进阶(二十三)Address already in use: JVM_Bind <null>:8088
- Address already in use: JVM_Bind:8080
- How To: Use Impersonation and Delegation in ASP.NET 2.0-from MS
- Have you considered making your output() function use variable arguments like printf()? In the examp
- Springboot启动报错:Address already in use: bind
- How to use next and last in Perl
- Use legacy animation system in Unity